X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/50f658142be71156945d5ab3a73ae3851365768b..380027ffe0ca1b741148d8f66c6fcb4c450ce588:/lib/short_link.rb diff --git a/lib/short_link.rb b/lib/short_link.rb index 424e85c10..8983f3bd3 100644 --- a/lib/short_link.rb +++ b/lib/short_link.rb @@ -32,11 +32,11 @@ module ShortLink else 3.times do x <<= 1 - x |= 1 unless (t & 32).zero? + x |= 1 unless t.nobits?(32) t <<= 1 y <<= 1 - y |= 1 unless (t & 32).zero? + y |= 1 unless t.nobits?(32) t <<= 1 end z += 3