[Fix] (MG_State/GL_Program): wrong guard condition in Uniformv_State

This commit is contained in:
2025-10-27 11:20:23 +08:00
parent 5e5d0f3dbe
commit 034aeb9b12
2 changed files with 4 additions and 2 deletions
@@ -473,7 +473,7 @@ namespace MobileGL {
return;
}
if (location >= programObject->GetUniformCount() || location < -1) {
if (location > programObject->GetMaxUniformLocation() || location < -1) {
MG_State::pGLContext->RecordError(
ErrorCode::InvalidOperation,
MakeShared<GenericErrorInfo>("MG_Impl/GLImpl", __func__,