Browse Source

fix a 32bit bug

blueloveTH 2 years ago
parent
commit
568221ab5a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      include/pocketpy/common.h

+ 3 - 0
include/pocketpy/common.h

@@ -72,6 +72,9 @@ template <size_t T>
 struct NumberTraits;
 struct NumberTraits;
 
 
 inline constexpr bool is_negative_shift_well_defined(){
 inline constexpr bool is_negative_shift_well_defined(){
+#ifdef __EMSRIPTEN__
+	return false;
+#endif
 	// rshift does not affect the sign bit
 	// rshift does not affect the sign bit
 	return ((int)-1) >> 1 == -1 && ((int64_t)-1) >> 1 == -1;
 	return ((int)-1) >> 1 == -1 && ((int64_t)-1) >> 1 == -1;
 }
 }