diff examples/example-battle/main.c @ 227:befa2e855d3b

core: reinterface the alloc module
author David Demelier <markand@malikania.fr>
date Thu, 19 Nov 2020 10:48:46 +0100
parents 23a844fdc911
children 86b71e1f9dd5
line wrap: on
line diff
--- a/examples/example-battle/main.c	Thu Nov 19 10:17:04 2020 +0100
+++ b/examples/example-battle/main.c	Thu Nov 19 10:48:46 2020 +0100
@@ -167,7 +167,7 @@
 static void
 prepare_to_fight(void)
 {
-	struct battle *bt = alloc_zero(1, sizeof (*bt));
+	struct battle *bt = alloc_new0(sizeof (*bt));
 
 //	bt->enemies[0].ch = &haunted_wood;
 	bt->team[0].ch = &team[0];