Fix bug where partially received messages data would be dropped,
causing a parse error when the rest of the message arrived.
This commit is contained in:
parent
ce5da16e2d
commit
ecda8e78c3
|
@ -359,7 +359,8 @@ msg_default ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
|
|||
}
|
||||
else if( 0 < res )
|
||||
{
|
||||
if( res > [_buf length])
|
||||
assert( res <= [_buf length]);
|
||||
if( res < [_buf length])
|
||||
{
|
||||
memmove( [_buf mutableBytes], [_buf bytes] + res,
|
||||
[_buf length] - res );
|
||||
|
|
Loading…
Reference in New Issue