mirror of
https://github.com/brunoos/luasec.git
synced 2025-02-13 15:32:48 +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
|
* object:receive() interface
|
||||||
\*-------------------------------------------------------------------------*/
|
\*-------------------------------------------------------------------------*/
|
||||||
int buffer_meth_receive(lua_State *L, p_buffer buf) {
|
int buffer_meth_receive(lua_State *L, p_buffer buf) {
|
||||||
int err = IO_DONE, top = lua_gettop(L);
|
|
||||||
luaL_Buffer b;
|
luaL_Buffer b;
|
||||||
size_t size;
|
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
|
#ifdef LUASOCKET_DEBUG
|
||||||
p_timeout tm = timeout_markstart(buf->tm);
|
p_timeout tm = timeout_markstart(buf->tm);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user