diff librpg/rpg/map-file.c @ 227:befa2e855d3b

core: reinterface the alloc module
author David Demelier <markand@malikania.fr>
date Thu, 19 Nov 2020 10:48:46 +0100
parents 64f24b482722
children 76afe639fd72
line wrap: on
line diff
--- a/librpg/rpg/map-file.c	Thu Nov 19 10:17:04 2020 +0100
+++ b/librpg/rpg/map-file.c	Thu Nov 19 10:48:46 2020 +0100
@@ -66,7 +66,7 @@
 	 * The next line after a layer declaration is a list of plain integer
 	 * that fill the layer tiles.
 	 */
-	if (!(ctx->mf->layers[layer_type].tiles = alloc_zero(amount, sizeof (unsigned short))))
+	if (!(ctx->mf->layers[layer_type].tiles = alloc_array0(amount, sizeof (unsigned short))))
 		return false;
 
 	for (int tile; fscanf(ctx->fp, "%d\n", &tile) && current < amount; ++current)