From 5db156fb08ebd12a2c61820fca96e664aba47189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 13 Aug 2024 09:53:40 +0200 Subject: [PATCH] Use INT32_MAX instead of inline value --- quickjs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickjs.h b/quickjs.h index bb5f85a..9fb40a7 100644 --- a/quickjs.h +++ b/quickjs.h @@ -516,7 +516,7 @@ static js_force_inline JSValue JS_NewInt64(JSContext *ctx, int64_t val) static js_force_inline JSValue JS_NewUint32(JSContext *ctx, uint32_t val) { JSValue v; - if (val <= 0x7fffffff) { + if (val <= INT32_MAX) { v = JS_NewInt32(ctx, (int32_t)val); } else { v = JS_NewFloat64(ctx, (double)val);