[Fix] (MG_Impl/Buffer): Fix incorrect return outside if.

This commit is contained in:
BZLZHH
2025-08-05 18:58:26 +08:00
parent e8af08aff0
commit a696fb2350
+4 -3
View File
@@ -271,11 +271,12 @@ namespace MobileGL {
if (readBufferObject == writeBufferObject) {
if ((readOffset <= writeOffset && readOffset + size > writeOffset) ||
(writeOffset <= readOffset && writeOffset + size > readOffset))
MG_State::pGLContext->RecordError(ErrorCode::InvalidValue,
(writeOffset <= readOffset && writeOffset + size > readOffset)) {
MG_State::pGLContext->RecordError(ErrorCode::InvalidValue,
MakeShared<GenericErrorInfo>("MG_Impl/GLImpl", "CopyBufferSubData_State",
"Source and destination buffers overlap in the specified ranges."));
return;
return;
}
}
auto isIllegallyMapped = [](const SharedPtr<MG_State::GLState::BufferObject>& buffer) {