Rely on arrayBufferView->ByteOffset()

This commit is contained in:
Alex Hultman 2019-03-01 21:56:09 +01:00
parent 9deaf72d0b
commit 40e6158ada
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ public:
Local<ArrayBufferView> arrayBufferView = Local<ArrayBufferView>::Cast(value);
ArrayBuffer::Contents contents = arrayBufferView->Buffer()->GetContents();
length = contents.ByteLength();
data = (char *) contents.Data();
data = (char *) contents.Data() + arrayBufferView->ByteOffset();
} else if (value->IsArrayBuffer()) {
Local<ArrayBuffer> arrayBuffer = Local<ArrayBuffer>::Cast(value);
ArrayBuffer::Contents contents = arrayBuffer->GetContents();

@ -1 +1 @@
Subproject commit 2afe6a6efb06176ebeee279bfada49f44ab07d5d
Subproject commit 6801ab8969660a0d82b8f84f585feefabebb16fa