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

This commit is contained in:
itchyny authored and GitHub committed 2023-08-03 23:19:52 +09:00
1 parent 53a62cf2b0
commit 949d38e6dc
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -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)
+4
View File
@@ -556,6 +556,10 @@ null
null
1e+17
5E500000000>5E-5000000000
null
true
25 % 7
null
4