Fix bit shifting errors at z0

This commit is contained in:
Eric Fischer
2014-09-22 18:08:37 -07:00
parent 6851e914a9
commit d7cdbec980
2 changed files with 34 additions and 13 deletions
+4 -2
View File
@@ -117,8 +117,10 @@ void write_tile(struct index *start, struct index *end, char *metabase, unsigned
long long wwx = (unsigned) wx;
long long wwy = (unsigned) wy;
wwx -= tx << (32 - z);
wwy -= ty << (32 - z);
if (z != 0) {
wwx -= tx << (32 - z);
wwy -= ty << (32 - z);
}
wwx >>= (32 - 12 - z);
wwy >>= (32 - 12 - z);