don't memcpy 0 bytes

This commit is contained in:
Eric House 2014-10-09 21:21:41 -07:00
parent 4eb836ab2b
commit b12d12590a

View file

@ -91,7 +91,9 @@ sortTiles( TrayTileSet* dest, const TrayTileSet* src, XP_U16 skip )
/* Copy in the ones we're not sorting */
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 ) {
XP_U16 ii, smallest;