mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
fix 'runtime error: left shift of negative value -12' error - refs #227
This commit is contained in:
committed by
Eric Fischer
parent
87fea8082f
commit
d35ef72a99
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user