mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-04-27 14:29:40 +00:00
fix 'runtime error: left shift of negative value -12' error - refs #227
This commit is contained in:
parent
87fea8082f
commit
d35ef72a99
5
mvt.cc
5
mvt.cc
@ -5,6 +5,7 @@
|
||||
#include <map>
|
||||
#include <zlib.h>
|
||||
#include "mvt.hh"
|
||||
#include "protozero/varint.hpp"
|
||||
#include "protozero/pbf_reader.hpp"
|
||||
#include "protozero/pbf_writer.hpp"
|
||||
|
||||
@ -332,8 +333,8 @@ std::string mvt_tile::encode() {
|
||||
int dx = wwx - px;
|
||||
int dy = wwy - py;
|
||||
|
||||
geometry.push_back((dx << 1) ^ (dx >> 31));
|
||||
geometry.push_back((dy << 1) ^ (dy >> 31));
|
||||
geometry.push_back(protozero::encode_zigzag32(dx));
|
||||
geometry.push_back(protozero::encode_zigzag32(dy));
|
||||
|
||||
px = wwx;
|
||||
py = wwy;
|
||||
|
Loading…
x
Reference in New Issue
Block a user