mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
update sproto: check table
This commit is contained in:
@@ -121,6 +121,9 @@ encode(const struct sproto_arg *args) {
|
|||||||
self->array_index = 0;
|
self->array_index = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (!lua_istable(L, -1)) {
|
||||||
|
return luaL_error(L, "%s is not a table", args->tagname);
|
||||||
|
}
|
||||||
if (self->array_index) {
|
if (self->array_index) {
|
||||||
lua_replace(L, self->array_index);
|
lua_replace(L, self->array_index);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user