Skip to content

Commit

Permalink
update sproto: check table
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwu committed Apr 1, 2015
1 parent c512b5f commit 41b447d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lualib-src/sproto/lsproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ encode(const struct sproto_arg *args) {
self->array_index = 0;
return 0;
}
if (!lua_istable(L, -1)) {
return luaL_error(L, "%s is not a table", args->tagname);
}
if (self->array_index) {
lua_replace(L, self->array_index);
} else {
Expand Down

0 comments on commit 41b447d

Please sign in to comment.