mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
should not copy the ending 0
This commit is contained in:
@@ -47,7 +47,7 @@ forward_message(int type, bool padding, struct socket_message * result) {
|
||||
sm->ud = result->ud;
|
||||
if (padding) {
|
||||
sm->buffer = NULL;
|
||||
strcpy((char*)(sm+1), result->data);
|
||||
memcpy(sm+1, result->data, sz - sizeof(*sm));
|
||||
} else {
|
||||
sm->buffer = result->data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user