diff options
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.46 2000/08/09 19:16:57 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.47 2000/08/28 17:57:04 roberto Exp roberto $ |
3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -400,6 +400,7 @@ static const char *lmemfind (const char *s1, size_t l1, | |||
400 | 400 | ||
401 | static int push_captures (lua_State *L, struct Capture *cap) { | 401 | static int push_captures (lua_State *L, struct Capture *cap) { |
402 | int i; | 402 | int i; |
403 | luaL_checkstack(L, cap->level, "too many captures"); | ||
403 | for (i=0; i<cap->level; i++) { | 404 | for (i=0; i<cap->level; i++) { |
404 | int l = cap->capture[i].len; | 405 | int l = cap->capture[i].len; |
405 | if (l == -1) lua_error(L, "unfinished capture"); | 406 | if (l == -1) lua_error(L, "unfinished capture"); |