bugfix: not padding 0

This commit is contained in:
Cloud Wu
2014-10-13 17:55:54 +08:00
parent c458eba6b4
commit 31d7b648b4
2 changed files with 2 additions and 3 deletions

View File

@@ -36,10 +36,9 @@ forward_message(int type, bool padding, struct socket_message * result) {
int sz = sizeof(*sm);
if (padding) {
if (result->data) {
sz += strlen(result->data) + 1;
sz += strlen(result->data);
} else {
result->data = "";
sz += 1;
}
}
sm = (struct skynet_socket_message *)skynet_malloc(sz);