Skip to content
Myr

Fix crash on numeric comparison (ref #2804) (#2818)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by itchyny · committed by GitHub · parent 53a62cf · Browse files · 2 files+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−1 removed

  • tests:+4 added−0 removed
  • other:+1 added−1 removed

2 files+5 added−1 removed

modified:src/jv.c+1 added-1 removed
534 unmodified lines
535 if (ctx) {536 if (key == &dec_ctx_key)537 {538 decContextDefault(ctx, DEC_INIT_BASE);539 ctx->digits = DEC_MAX_DIGITS;539 ctx->digits = DEC_MAX_DIGITS - 1;540 ctx->traps = 0; /*no errors*/541 }542 else if (key == &dec_ctx_dbl_key)543 {
1448 unmodified lines
modified:tests/jq.test+4 added
554 unmodified lines
5551 / 1e-17556null5571e+175585595E500000000>5E-5000000000560null561true56256325 % 7564null5654566
1442 unmodified lines