Skip to content

Commit dc910ef

Browse files
committed
fix uniformLocation
1 parent f3b0956 commit dc910ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3348,7 +3348,7 @@ bool luaval_to_uniformLocation(lua_State* L, int pos, cocos2d::backend::UniformL
33483348
return false;
33493349

33503350
lua_pushstring(L, "location");
3351-
lua_gettable(L, pos - 1);
3351+
lua_gettable(L, pos );
33523352
if (lua_isnil(L, -1)) {
33533353
CCASSERT(false, "invalidate UniformLocation value");
33543354
}
@@ -3362,7 +3362,7 @@ bool luaval_to_uniformLocation(lua_State* L, int pos, cocos2d::backend::UniformL
33623362
lua_pop(L, 1);
33633363

33643364
lua_pushstring(L, "shaderStage");
3365-
lua_gettable(L, pos -1);
3365+
lua_gettable(L, pos);
33663366
if (lua_isnil(L, -1)) {
33673367
CCASSERT(false, "invalidate UniformLocation value");
33683368
}

0 commit comments

Comments
 (0)