[Fix] (MG_State/GL_Texture): SubImage2D missing a row of texels

This commit is contained in:
2025-10-28 16:57:06 +08:00
parent b3e7987985
commit 0e01a7281e
@@ -86,7 +86,7 @@ namespace MobileGL {
// Should take states from glPixelStorei/glPixelStoref into account
SizeT srcOffset = row * width * bytesPerPixel;
if (dstOffset + width * bytesPerPixel < data.size()) {
if (dstOffset + width * bytesPerPixel <= data.size()) {
Memcpy(data.data() + dstOffset, srcData + srcOffset, width * bytesPerPixel);
} else {
MG_State::pGLContext->RecordError(