X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/550c4a3a45814fde5c809334c85f1ebc47659a82..9421f514e132d3e160021ede7291ce5dc22c3285:/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