diff --git a/src/jv.c b/src/jv.c index 9784b22fee..e1fb209f34 100644 --- a/src/jv.c +++ b/src/jv.c @@ -612,6 +612,7 @@ static jv jvp_literal_number_new(const char * literal) { n->refcnt = JV_REFCNT_INIT; n->literal_data = NULL; decContext *ctx = DEC_CONTEXT(); + decContextClearStatus(ctx, DEC_Conversion_syntax); decNumberFromString(&n->num_decimal, literal, ctx); n->num_double = NAN; diff --git a/tests/man.test b/tests/man.test index 2a49effe6c..1c6ff67ed7 100644 --- a/tests/man.test +++ b/tests/man.test @@ -841,3 +841,8 @@ true {"foo": 42} {"foo": 43} +.[]|tonumber? +["1", "hello", "3", 4] +1 +3 +4