mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
fix a minor bug when unpacking string from skynet_socket_message
This commit is contained in:
@@ -368,7 +368,7 @@ lunpack(lua_State *L) {
|
||||
lua_pushinteger(L, message->id);
|
||||
lua_pushinteger(L, message->ud);
|
||||
if (message->buffer == NULL) {
|
||||
lua_pushlstring(L, (char *)(message+1),size - sizeof(*message));
|
||||
lua_pushlstring(L, (char *)(message+1),size - sizeof(*message) - 1);
|
||||
} else {
|
||||
lua_pushlightuserdata(L, message->buffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user