diff options
Diffstat (limited to 'ltablib.c')
-rw-r--r-- | ltablib.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltablib.c,v 1.39 2007/06/21 13:48:04 roberto Exp roberto $ | 2 | ** $Id: ltablib.c,v 1.40 2007/06/21 13:50:53 roberto Exp roberto $ |
3 | ** Library for Table Manipulation | 3 | ** Library for Table Manipulation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -133,7 +133,9 @@ static int tconcat (lua_State *L) { | |||
133 | luaL_buffinit(L, &b); | 133 | luaL_buffinit(L, &b); |
134 | for (; i <= last; i++) { | 134 | for (; i <= last; i++) { |
135 | lua_rawgeti(L, 1, i); | 135 | lua_rawgeti(L, 1, i); |
136 | luaL_argcheck(L, lua_isstring(L, -1), 1, "table contains non-strings"); | 136 | if (!lua_isstring(L, -1)) |
137 | return luaL_error(L, "invalid value (%s) at index %d in table for " | ||
138 | LUA_QL("concat"), luaL_typename(L, -1), i); | ||
137 | luaL_addvalue(&b); | 139 | luaL_addvalue(&b); |
138 | if (i != last) | 140 | if (i != last) |
139 | luaL_addlstring(&b, sep, lsep); | 141 | luaL_addlstring(&b, sep, lsep); |