diff --git a/quickjs.c b/quickjs.c index 7916013..3696011 100644 --- a/quickjs.c +++ b/quickjs.c @@ -10738,7 +10738,7 @@ static int JS_ToInt64SatFree(JSContext *ctx, int64_t *pres, JSValue val) } else { if (d < INT64_MIN) *pres = INT64_MIN; - else if (d > INT64_MAX) + else if (d >= 0x1p63) *pres = INT64_MAX; else *pres = (int64_t)d; @@ -53844,7 +53844,7 @@ static JSValue js_atomics_wait(JSContext *ctx, } if (JS_ToFloat64(ctx, &d, argv[3])) return JS_EXCEPTION; - if (isnan(d) || d > INT64_MAX) + if (isnan(d) || d >= 0x1p63) timeout = INT64_MAX; else if (d < 0) timeout = 0;