always initialize the sprites[] array

Else, checks for  e.g. in P_SpawnMobj() may fail.
This commit is contained in:
Fabian Greffrath 2023-09-14 09:09:24 +02:00
parent 26a5f22c01
commit 97d125b782

View File

@ -169,7 +169,7 @@ void R_InitSpriteDefs(char **namelist)
if (!numentries || !*namelist)
return;
sprites = Z_Malloc(num_sprites *sizeof(*sprites), PU_STATIC, NULL);
sprites = Z_Calloc(num_sprites, sizeof(*sprites), PU_STATIC, NULL);
// Create hash table based on just the first four letters of each sprite
// killough 1/31/98