mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-10 21:28:32 +09:00
[Fix] (MG_Impl/Buffer): Fix incorrect return outside if.
This commit is contained in:
@@ -271,11 +271,12 @@ namespace MobileGL {
|
|||||||
|
|
||||||
if (readBufferObject == writeBufferObject) {
|
if (readBufferObject == writeBufferObject) {
|
||||||
if ((readOffset <= writeOffset && readOffset + size > writeOffset) ||
|
if ((readOffset <= writeOffset && readOffset + size > writeOffset) ||
|
||||||
(writeOffset <= readOffset && writeOffset + size > readOffset))
|
(writeOffset <= readOffset && writeOffset + size > readOffset)) {
|
||||||
MG_State::pGLContext->RecordError(ErrorCode::InvalidValue,
|
MG_State::pGLContext->RecordError(ErrorCode::InvalidValue,
|
||||||
MakeShared<GenericErrorInfo>("MG_Impl/GLImpl", "CopyBufferSubData_State",
|
MakeShared<GenericErrorInfo>("MG_Impl/GLImpl", "CopyBufferSubData_State",
|
||||||
"Source and destination buffers overlap in the specified ranges."));
|
"Source and destination buffers overlap in the specified ranges."));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto isIllegallyMapped = [](const SharedPtr<MG_State::GLState::BufferObject>& buffer) {
|
auto isIllegallyMapped = [](const SharedPtr<MG_State::GLState::BufferObject>& buffer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user