mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-05-02 00:52:53 +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 <map>
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#include "mvt.hh"
|
#include "mvt.hh"
|
||||||
|
#include "protozero/varint.hpp"
|
||||||
#include "protozero/pbf_reader.hpp"
|
#include "protozero/pbf_reader.hpp"
|
||||||
#include "protozero/pbf_writer.hpp"
|
#include "protozero/pbf_writer.hpp"
|
||||||
|
|
||||||
@ -332,8 +333,8 @@ std::string mvt_tile::encode() {
|
|||||||
int dx = wwx - px;
|
int dx = wwx - px;
|
||||||
int dy = wwy - py;
|
int dy = wwy - py;
|
||||||
|
|
||||||
geometry.push_back((dx << 1) ^ (dx >> 31));
|
geometry.push_back(protozero::encode_zigzag32(dx));
|
||||||
geometry.push_back((dy << 1) ^ (dy >> 31));
|
geometry.push_back(protozero::encode_zigzag32(dy));
|
||||||
|
|
||||||
px = wwx;
|
px = wwx;
|
||||||
py = wwy;
|
py = wwy;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user