Mapster32: fix faulty limit check in duplicate_selected_sprites().

git-svn-id: https://svn.eduke32.com/eduke32@2479 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-14 22:30:42 +00:00
parent 4d4221d71f
commit 77630792f6
1 changed files with 3 additions and 3 deletions

View File

@ -142,7 +142,6 @@ typedef struct
sectortype *sector;
walltype *wall;
spritetype *sprite;
} mapinfofull_t;
static int32_t backup_highlighted_map(mapinfofull_t *mapinfo);
@ -1928,9 +1927,10 @@ static void duplicate_selected_sprites(void)
int32_t i, j, k=0;
for (i=0; i<highlightcnt; i++)
k += ((highlight[i]&0xc000) == 16384);
if ((highlight[i]&0xc000) == 16384)
k++;
if (highlightcnt + k <= MAXSPRITES)
if (Numsprites + k <= MAXSPRITES)
{
for (i=0; i<highlightcnt; i++)
if ((highlight[i]&0xc000) == 16384)