aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/preamble.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/preamble.js b/src/preamble.js
index a5342f89..503b09f1 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -163,15 +163,17 @@ function CHECK_OVERFLOW(value, bits, ignore, sig) {
if (value === Infinity || value === -Infinity || value >= twopbits1 || value < -twopbits1) {
throw 'SignedOverflow';
if (value === Infinity || value === -Infinity || Math.abs(value) >= twopbits) throw 'Overflow';
+ }
#else
if (value === Infinity || value === -Infinity || Math.abs(value) >= twopbits) {
throw 'Overflow';
+ }
#endif
#if CORRECT_OVERFLOWS
- // Fail on >32 bits - we warned at compile time
- if (bits <= 32) {
- value = value & (twopbits - 1);
- }
+ // Fail on >32 bits - we warned at compile time
+ if (bits <= 32) {
+ value = value & (twopbits - 1);
+ }
#endif
return value;
}