summaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 502ea814..2e88f6e7 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.102 2004/04/30 20:13:38 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.103 2004/06/08 14:31:15 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*/
@@ -133,7 +133,7 @@ static int str_char (lua_State *L) {
133static int writer (lua_State *L, const void* b, size_t size, void* B) { 133static int writer (lua_State *L, const void* b, size_t size, void* B) {
134 (void)L; 134 (void)L;
135 luaL_addlstring((luaL_Buffer*) B, (const char *)b, size); 135 luaL_addlstring((luaL_Buffer*) B, (const char *)b, size);
136 return 1; 136 return 0;
137} 137}
138 138
139 139
@@ -142,7 +142,7 @@ static int str_dump (lua_State *L) {
142 luaL_checktype(L, 1, LUA_TFUNCTION); 142 luaL_checktype(L, 1, LUA_TFUNCTION);
143 lua_settop(L, 1); 143 lua_settop(L, 1);
144 luaL_buffinit(L,&b); 144 luaL_buffinit(L,&b);
145 if (!lua_dump(L, writer, &b)) 145 if (lua_dump(L, writer, &b) != 0)
146 luaL_error(L, "unable to dump given function"); 146 luaL_error(L, "unable to dump given function");
147 luaL_pushresult(&b); 147 luaL_pushresult(&b);
148 return 1; 148 return 1;