X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9c0582f88fd2ef4e20c6eb922bcd4cb1a04258d5..b8247478f4f772df8d09a29f3acd383fc6d32cf0:/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