json: do not print output on a JSON parse error - frontends - front-ends for so… | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 587b2d3d299bff29e6b941c22fe7aa526cbc9135 | |
parent 61d393efb87ceac4df82a714d1ecf13fcf1ee664 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Fri, 24 Feb 2023 17:25:38 +0100 | |
json: do not print output on a JSON parse error | |
Diffstat: | |
M json.c | 2 ++ | |
1 file changed, 2 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/json.c b/json.c | |
@@ -111,8 +111,10 @@ capacity(char **value, size_t *sz, size_t cur, size_t inc) | |
#define JSON_INVALID() do { ret = JSON_ERROR_INVALID; goto end; } while … | |
/* DEBUG */ | |
+#ifdef DEBUG | |
#undef JSON_INVALID | |
#define JSON_INVALID() do { ret = JSON_ERROR_INVALID; fprintf(stderr, "%… | |
+#endif | |
int | |
parsejson(const char *s, size_t slen, |