mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 637643 - A subarray of a typed array subarray not at offset zero doesn't contain the right data. r=jwalden
--HG-- extra : rebase_source : f6fe88592e66101dc065bd82f35e4d2f3fd1cb1a
This commit is contained in:
parent
0dc25a462f
commit
c5822baf18
@ -1105,7 +1105,8 @@ class TypedArrayTemplate
|
||||
uint32 length = end - begin;
|
||||
|
||||
JS_ASSERT(begin < UINT32_MAX / sizeof(NativeType));
|
||||
uint32 byteOffset = begin * sizeof(NativeType);
|
||||
JS_ASSERT(UINT32_MAX - begin * sizeof(NativeType) >= tarray->byteOffset);
|
||||
uint32 byteOffset = tarray->byteOffset + begin * sizeof(NativeType);
|
||||
|
||||
return createTypedArray(cx, bufobj, byteOffset, length);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user