From 81bff78c86fc5292658b3cba487bababdcbafe31 Mon Sep 17 00:00:00 2001 From: dev31337 Date: Sat, 20 Jun 2020 17:22:04 +0100 Subject: [PATCH] lejp: enable negative integers https://github.com/warmcat/libwebsockets/issues/1957 --- lib/misc/lejp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/misc/lejp.c b/lib/misc/lejp.c index 774952883..8f7a0c095 100644 --- a/lib/misc/lejp.c +++ b/lib/misc/lejp.c @@ -434,7 +434,7 @@ lejp_parse(struct lejp_ctx *ctx, const unsigned char *json, int len) break; case LEJP_MP_VALUE: - if (c >= '0' && c <= '9') { + if (c == '-' || (c >= '0' && c <= '9')) { ctx->npos = 0; ctx->dcount = 0; ctx->f = 0;