diff --git a/src/jv.c b/src/jv.c index 38127773..933ed7be 100644 --- a/src/jv.c +++ b/src/jv.c @@ -536,7 +536,7 @@ static decContext* tsd_dec_ctx_get(pthread_key_t *key) { if (key == &dec_ctx_key) { decContextDefault(ctx, DEC_INIT_BASE); - ctx->digits = DEC_MAX_DIGITS; + ctx->digits = DEC_MAX_DIGITS - 1; ctx->traps = 0; /*no errors*/ } else if (key == &dec_ctx_dbl_key) diff --git a/tests/jq.test b/tests/jq.test index 246da0fc..3ba29add 100644 --- a/tests/jq.test +++ b/tests/jq.test @@ -556,6 +556,10 @@ null null 1e+17 +5E500000000>5E-5000000000 +null +true + 25 % 7 null 4