mirror of
https://github.com/felt/tippecanoe.git
synced 2026-11-21 16:01:18 +01:00
Don't truncate multi-byte characters in json output (#428)
don't truncate multi-byte characters in json output
This commit is contained in:
+2
-1
@@ -12,6 +12,7 @@
|
||||
#include <errno.h>
|
||||
#include "geojson-loop.hpp"
|
||||
#include "jsonpull/jsonpull.h"
|
||||
#include "text.hpp"
|
||||
|
||||
// XXX duplicated
|
||||
#define GEOM_TYPES 6
|
||||
@@ -29,7 +30,7 @@ static void json_context(json_object *j) {
|
||||
std::string s = json_stringify(j);
|
||||
|
||||
if (s.size() >= 500) {
|
||||
s.resize(497);
|
||||
s = truncate_string(s, 497);
|
||||
s.append("...");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ void json_context(json_object *j) {
|
||||
std::string s = json_stringify(j);
|
||||
|
||||
if (s.size() >= 500) {
|
||||
s.resize(497);
|
||||
s = truncate_string(s, 497);
|
||||
s.append("...");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user