mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
bugfix: not padding 0
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user