diff options
-rw-r--r-- | lptree.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1205,13 +1205,12 @@ static int lp_match (lua_State *L) { | |||
1205 | if (r == NULL) { /* labeled failure begin */ | 1205 | if (r == NULL) { /* labeled failure begin */ |
1206 | lua_pushnil(L); | 1206 | lua_pushnil(L); |
1207 | if (labelf) { | 1207 | if (labelf) { |
1208 | int isnum; | 1208 | lua_Integer luaInt; |
1209 | lua_Integer lInt; | ||
1210 | lua_rawgeti(L, ktableidx(ptop), labelf); | 1209 | lua_rawgeti(L, ktableidx(ptop), labelf); |
1211 | lInt = lua_tointegerx(L, -1, &isnum); | 1210 | luaInt = lua_tointeger(L, -1); |
1212 | if (isnum) { | 1211 | if (luaInt) { |
1213 | lua_pop(L, 1); | 1212 | lua_pop(L, 1); |
1214 | lua_pushinteger(L, lInt); | 1213 | lua_pushinteger(L, luaInt); |
1215 | } | 1214 | } |
1216 | } | 1215 | } |
1217 | else | 1216 | else |