mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +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;
|
sm->ud = result->ud;
|
||||||
if (padding) {
|
if (padding) {
|
||||||
sm->buffer = NULL;
|
sm->buffer = NULL;
|
||||||
strcpy((char*)(sm+1), result->data);
|
memcpy(sm+1, result->data, sz - sizeof(*sm));
|
||||||
} else {
|
} else {
|
||||||
sm->buffer = result->data;
|
sm->buffer = result->data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user