mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
see issue #715
This commit is contained in:
@@ -257,6 +257,9 @@ static int
|
|||||||
lclearbuffer(lua_State *L) {
|
lclearbuffer(lua_State *L) {
|
||||||
struct socket_buffer * sb = lua_touserdata(L, 1);
|
struct socket_buffer * sb = lua_touserdata(L, 1);
|
||||||
if (sb == NULL) {
|
if (sb == NULL) {
|
||||||
|
if (lua_isnil(L, 1)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return luaL_error(L, "Need buffer object at param 1");
|
return luaL_error(L, "Need buffer object at param 1");
|
||||||
}
|
}
|
||||||
luaL_checktype(L,2,LUA_TTABLE);
|
luaL_checktype(L,2,LUA_TTABLE);
|
||||||
|
|||||||
Reference in New Issue
Block a user