mirror of
https://github.com/brunoos/luasec.git
synced 2024-11-08 06:28:26 +01:00
Set parameter 2 and 3 to none before luaL_buffinit()
This commit is contained in:
parent
711a98b760
commit
34252fb10a
@ -107,10 +107,16 @@ int buffer_meth_send(lua_State *L, p_buffer buf) {
|
||||
* object:receive() interface
|
||||
\*-------------------------------------------------------------------------*/
|
||||
int buffer_meth_receive(lua_State *L, p_buffer buf) {
|
||||
int err = IO_DONE, top = lua_gettop(L);
|
||||
luaL_Buffer b;
|
||||
size_t size;
|
||||
const char *part = luaL_optlstring(L, 3, "", &size);
|
||||
const char *part;
|
||||
int err = IO_DONE;
|
||||
int top = lua_gettop(L);
|
||||
if (top < 3) {
|
||||
lua_settop(L, 3);
|
||||
top = 3;
|
||||
}
|
||||
part = luaL_optlstring(L, 3, "", &size);
|
||||
#ifdef LUASOCKET_DEBUG
|
||||
p_timeout tm = timeout_markstart(buf->tm);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user