X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7e5cbe87ed37f9cba8224fa4049047d7f981f66a..43ce6e68c09cdb4e66a7af9849e36c9406d2eb05:/lib/short_link.rb?ds=inline 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