mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
fix crash: src and dest stream params were reversed.
This commit is contained in:
parent
92a2fb1a1f
commit
4bb61401bd
1 changed files with 4 additions and 2 deletions
|
@ -313,7 +313,7 @@ readStreamIf( ServerCtxt* server, XWStreamCtxt* in )
|
|||
XP_U16 len = stream_getU16( in );
|
||||
if ( 0 < len ) {
|
||||
result = mkServerStream( server );
|
||||
stream_copyFromStream( in, result, len );
|
||||
stream_copyFromStream( result, in, len );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -323,7 +323,9 @@ writeStreamIf( XWStreamCtxt* dest, XWStreamCtxt* src )
|
|||
{
|
||||
XP_U16 len = !!src ? stream_getSize( src ) : 0;
|
||||
stream_putU16( dest, len );
|
||||
stream_copyFromStream( dest, src, len );
|
||||
if ( 0 < len ) {
|
||||
stream_copyFromStream( dest, src, len );
|
||||
}
|
||||
}
|
||||
|
||||
ServerCtxt*
|
||||
|
|
Loading…
Reference in a new issue