mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-03 08:55:41 +02:00
Correct two stale comments in the jsonpull port
jsonpull.h said a json_number is 40 bytes; it is 32 (json_object is 24, and the repr discriminator fits in the base class's tail padding, so the 8-byte union lands at offset 24). plugin.cpp's parse_feature() said `j` is freed only just before returning or as jp->root at end of stream, but there is a third json_free(j) at the bottom of the loop, for a complete Feature whose geometry came out empty. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017KNxyHKasyWrWcvre2yK4r
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ struct json_object {
|
||||
inline const std::string &string() const;
|
||||
|
||||
// Numbers are stored in a discriminated union (double / unsigned /
|
||||
// signed) so a json_number is only 40 bytes instead of 48. The
|
||||
// signed) so a json_number is only 32 bytes instead of 48. The
|
||||
// large_*() accessors return 0 when the number is not currently
|
||||
// stored in that representation, matching the prior convention
|
||||
// where "0" meant "not set, fall through to the next slot".
|
||||
|
||||
Reference in New Issue
Block a user