Skip to content

Commit 53e837f

Browse files
Update util-inl.h
Co-authored-by: René <[email protected]>
1 parent 8104939 commit 53e837f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/util-inl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,9 @@ void ArrayBufferViewContents<T, S>::Read(v8::Local<v8::ArrayBufferView> abv) {
591591
static_assert(sizeof(T) == 1, "Only supports one-byte data at the moment");
592592
length_ = abv->ByteLength();
593593
if (length_ > sizeof(stack_storage_) || abv->HasBuffer()) {
594-
auto buf = abv->Buffer();
595-
data_ = buf->Data() != nullptr
596-
? static_cast<T*>(buf->Data()) + abv->ByteOffset()
594+
auto buf_data = abv->Buffer()->Data();
595+
data_ = buf_data != nullptr
596+
? static_cast<T*>(buf_data) + abv->ByteOffset()
597597
: stack_storage_;
598598
} else {
599599
abv->CopyContents(stack_storage_, sizeof(stack_storage_));

0 commit comments

Comments
 (0)