diff --git a/src/dawn/wire/BufferConsumer_impl.h b/src/dawn/wire/BufferConsumer_impl.h index 52b6720219..98e239028c 100644 --- a/src/dawn/wire/BufferConsumer_impl.h +++ b/src/dawn/wire/BufferConsumer_impl.h @@ -54,7 +54,7 @@ WireResult BufferConsumer::NextN(N count, T** data) { // If size is zero then it indicates an overflow. auto size = WireAlignSizeofN(count); - if (size && *size > mSize) { + if (!size || *size > mSize) { return WireResult::FatalError; }