From 568221ab5a0736d122cf579c0780b5b8a6ede171 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 24 Mar 2024 20:17:40 +0800 Subject: [PATCH] fix a 32bit bug --- include/pocketpy/common.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/pocketpy/common.h b/include/pocketpy/common.h index 187bc2b8..79a0ab0b 100644 --- a/include/pocketpy/common.h +++ b/include/pocketpy/common.h @@ -72,6 +72,9 @@ template struct NumberTraits; inline constexpr bool is_negative_shift_well_defined(){ +#ifdef __EMSRIPTEN__ + return false; +#endif // rshift does not affect the sign bit return ((int)-1) >> 1 == -1 && ((int64_t)-1) >> 1 == -1; }