[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
@@ -25,7 +25,9 @@ namespace MobileGL {
Uint GetMaxUniformLocation() const { return m_maxUniformLocation; }
Int GetUniformLocation(const String& name) {
const auto it = m_uniformLocations.find(name);
return (it == m_uniformLocations.end()) ? -1 : (Int)it->second;
if (it == m_uniformLocations.end())
return -1;
return (Int)it->second;
}
GLenum GetUniformType(Uint index) const { return m_uniformTypes[index]; }