diff options
-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.101 2004/01/02 11:54:14 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.102 2004/04/30 20:13:38 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 | */ |
@@ -140,6 +140,7 @@ static int writer (lua_State *L, const void* b, size_t size, void* B) { | |||
140 | static int str_dump (lua_State *L) { | 140 | static int str_dump (lua_State *L) { |
141 | luaL_Buffer b; | 141 | luaL_Buffer b; |
142 | luaL_checktype(L, 1, LUA_TFUNCTION); | 142 | luaL_checktype(L, 1, LUA_TFUNCTION); |
143 | lua_settop(L, 1); | ||
143 | luaL_buffinit(L,&b); | 144 | luaL_buffinit(L,&b); |
144 | if (!lua_dump(L, writer, &b)) | 145 | if (!lua_dump(L, writer, &b)) |
145 | luaL_error(L, "unable to dump given function"); | 146 | luaL_error(L, "unable to dump given function"); |