Improve LLVM compatibility a little bit

This commit is contained in:
Justine Tunney 2021-05-16 20:34:46 -07:00
parent 3057315a1b
commit 1a3d22b2fd
7 changed files with 14 additions and 12 deletions

View file

@ -10731,7 +10731,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 > (double)INT64_MAX)
*pres = INT64_MAX;
else
*pres = (int64_t)d;