Index: src/arraybuffer.js |
diff --git a/src/arraybuffer.js b/src/arraybuffer.js |
index d5fd9adbad887183eba334a415c97ddf8af13414..cfaa8d7efca4689b9b715cd3fb34212d6e35346e 100644 |
--- a/src/arraybuffer.js |
+++ b/src/arraybuffer.js |
@@ -56,9 +56,6 @@ function ArrayBufferSlice(start, end) { |
} |
var relativeStart = TO_INTEGER(start); |
- if (!IS_UNDEFINED(end)) { |
- end = TO_INTEGER(end); |
- } |
var first; |
var byte_length = %ArrayBufferGetByteLength(this); |
if (relativeStart < 0) { |
@@ -66,7 +63,7 @@ function ArrayBufferSlice(start, end) { |
} else { |
first = MathMin(relativeStart, byte_length); |
} |
- var relativeEnd = IS_UNDEFINED(end) ? byte_length : end; |
+ var relativeEnd = IS_UNDEFINED(end) ? byte_length : TO_INTEGER(end); |
var fin; |
if (relativeEnd < 0) { |
fin = MathMax(byte_length + relativeEnd, 0); |