1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

lejp: enable negative integers

https://github.com/warmcat/libwebsockets/issues/1957
This commit is contained in:
dev31337 2020-06-20 17:22:04 +01:00 committed by Andy Green
parent 43ba4e4ef5
commit 81bff78c86

View file

@ -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;