mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
don't memcpy 0 bytes
This commit is contained in:
parent
4eb836ab2b
commit
b12d12590a
1 changed files with 3 additions and 1 deletions
|
@ -91,7 +91,9 @@ sortTiles( TrayTileSet* dest, const TrayTileSet* src, XP_U16 skip )
|
||||||
|
|
||||||
/* Copy in the ones we're not sorting */
|
/* Copy in the ones we're not sorting */
|
||||||
dest->nTiles = skip;
|
dest->nTiles = skip;
|
||||||
XP_MEMCPY( &dest->tiles, &tmp.tiles, skip * sizeof(tmp.tiles[0]) );
|
if ( 0 < skip ) {
|
||||||
|
XP_MEMCPY( &dest->tiles, &tmp.tiles, skip * sizeof(tmp.tiles[0]) );
|
||||||
|
}
|
||||||
|
|
||||||
while ( skip < tmp.nTiles ) {
|
while ( skip < tmp.nTiles ) {
|
||||||
XP_U16 ii, smallest;
|
XP_U16 ii, smallest;
|
||||||
|
|
Loading…
Add table
Reference in a new issue