mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
sproto: check args
This commit is contained in:
@@ -532,6 +532,9 @@ lprotocol(lua_State *L) {
|
||||
lua_pushstring(L, name);
|
||||
} else {
|
||||
const char * name = lua_tostring(L, 2);
|
||||
if (name == NULL) {
|
||||
return luaL_argerror(L, 2, "Should be number or string");
|
||||
}
|
||||
tag = sproto_prototag(sp, name);
|
||||
if (tag < 0)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user