diff options
Diffstat (limited to 'lpvm.c')
-rw-r--r-- | lpvm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lpvm.c,v 1.5 2013/04/12 16:29:49 roberto Exp $ | 2 | ** $Id: lpvm.c,v 1.6 2015/09/28 17:01:25 roberto Exp $ |
3 | ** Copyright 2007, Lua.org & PUC-Rio (see 'lpeg.html' for license) | 3 | ** Copyright 2007, Lua.org & PUC-Rio (see 'lpeg.html' for license) |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | /* initial size for call/backtrack stack */ | 19 | /* initial size for call/backtrack stack */ |
20 | #if !defined(INITBACK) | 20 | #if !defined(INITBACK) |
21 | #define INITBACK 100 | 21 | #define INITBACK MAXBACK |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | 24 | ||
@@ -71,7 +71,7 @@ static Stack *doublestack (lua_State *L, Stack **stacklimit, int ptop) { | |||
71 | max = lua_tointeger(L, -1); /* maximum allowed size */ | 71 | max = lua_tointeger(L, -1); /* maximum allowed size */ |
72 | lua_pop(L, 1); | 72 | lua_pop(L, 1); |
73 | if (n >= max) /* already at maximum size? */ | 73 | if (n >= max) /* already at maximum size? */ |
74 | luaL_error(L, "too many pending calls/choices"); | 74 | luaL_error(L, "backtrack stack overflow (current limit is %d)", max); |
75 | newn = 2 * n; /* new size */ | 75 | newn = 2 * n; /* new size */ |
76 | if (newn > max) newn = max; | 76 | if (newn > max) newn = max; |
77 | newstack = (Stack *)lua_newuserdata(L, newn * sizeof(Stack)); | 77 | newstack = (Stack *)lua_newuserdata(L, newn * sizeof(Stack)); |