From 8d543ffd64f9c1e038039d4c9bf5df9075b6b7e4 Mon Sep 17 00:00:00 2001 From: "jc.yuan" Date: Sun, 18 Feb 2024 23:10:19 +0800 Subject: [PATCH] fix the wrong size used to resize the buffer --- native/cocos/renderer/gfx-validator/BufferValidator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/cocos/renderer/gfx-validator/BufferValidator.cpp b/native/cocos/renderer/gfx-validator/BufferValidator.cpp index a6e5f691b05..a2c60e8cdab 100644 --- a/native/cocos/renderer/gfx-validator/BufferValidator.cpp +++ b/native/cocos/renderer/gfx-validator/BufferValidator.cpp @@ -176,7 +176,7 @@ void BufferValidator::sanityCheck(const void *buffer, uint32_t size) { } if (DeviceValidator::getInstance()->isRecording()) { - _buffer.resize(_size); + _buffer.resize(size); memcpy(_buffer.data(), buffer, size); }