1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00
Andy Green 2018-01-04 10:28:06 +08:00
parent 48be844e5b
commit 2e4ac9defe
2 changed files with 2 additions and 2 deletions

View file

@ -476,7 +476,7 @@ lejp_parse(struct lejp_ctx *ctx, const unsigned char *json, int len)
goto append_npos;
}
if (c == '.') {
if (ctx->dcount || (ctx->f & LEJP_SEEN_POINT)) {
if (!ctx->dcount || (ctx->f & LEJP_SEEN_POINT)) {
ret = LEJP_REJECT_MP_VAL_NUM_FORMAT;
goto reject;
}

View file

@ -89,7 +89,7 @@ main(int argc, char *argv[])
lws_set_log_level(7, NULL);
lwsl_notice("libwebsockets-test-lejp (C)2017 andy@warmcat.com\n");
lwsl_notice("libwebsockets-test-lejp (C) 2017 - 2018 andy@warmcat.com\n");
lwsl_notice(" usage: cat my.json | libwebsockets-test-lejp\n\n");
lejp_construct(&ctx, cb, NULL, tok, ARRAY_SIZE(tok));