mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
lejp: fix float
https://libwebsockets.org/pipermail/libwebsockets/2018-January/003599.html
This commit is contained in:
parent
48be844e5b
commit
2e4ac9defe
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue