Skip to content

Commit

Permalink
Merge pull request #176 from linan0827/master
Browse files Browse the repository at this point in the history
fix a minor bug when unpacking string from skynet_socket_message
  • Loading branch information
cloudwu committed Oct 12, 2014
2 parents 9713b05 + bfc3fd4 commit 0aa5274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lualib-src/lua-socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0aa5274

Please sign in to comment.