Closed lujieha closed 2 years ago
https://github.com/paulmach/orb/blob/ba1cf206b6a28651b920834d26baac25c5476e64/encoding/mvt/projection.go#L23 tile:={x:1730576,y:798477,z:21} //n=12(4096) minx := float64(tile.X << n) //minx=2793472000 (overflow)
tile:={x:1730576,y:798477,z:21} //n=12(4096) minx := float64(tile.X << n)
The code is modified : minx := float64(uint64(tile.X) << n) //minx=7088439296 (correct)
minx := float64(uint64(tile.X) << n)
Similar bugs may appear in other codes...
fixed in https://github.com/paulmach/orb/pull/74 released in v0.3.0
https://github.com/paulmach/orb/blob/ba1cf206b6a28651b920834d26baac25c5476e64/encoding/mvt/projection.go#L23
tile:={x:1730576,y:798477,z:21} //n=12(4096) minx := float64(tile.X << n)
//minx=2793472000 (overflow)The code is modified :
minx := float64(uint64(tile.X) << n)
//minx=7088439296 (correct)Similar bugs may appear in other codes...