diff libmlk-rpg/mlk/rpg/battle-state-check.c @ 438:25a56ca53ac2

core: update mlk-alloc module
author David Demelier <markand@malikania.fr>
date Mon, 17 Oct 2022 14:22:07 +0200
parents 4e78f045e8c0
children 9c3b3935f0aa
line wrap: on
line diff
--- a/libmlk-rpg/mlk/rpg/battle-state-check.c	Sun Oct 16 13:21:40 2022 +0200
+++ b/libmlk-rpg/mlk/rpg/battle-state-check.c	Mon Oct 17 14:22:07 2022 +0200
@@ -88,7 +88,7 @@
 		return;
 	}
 
-	fade = alloc_new0(sizeof (*fade));
+	fade = mlk_alloc_new0(sizeof (*fade));
 	fade->ch = et->ch;
 	fade->x = et->x;
 	fade->y = et->y;
@@ -99,7 +99,7 @@
 	fade->dw.finish = fadeout_finish;
 
 	if (drawable_stack_add(bt->effects, &fade->dw) < 0)
-		free(fade);
+		mlk_alloc_free(fade);
 }
 
 static int
@@ -197,7 +197,7 @@
 
 	struct battle_state *self;
 
-	self = alloc_new0(sizeof (*self));
+	self = mlk_alloc_new0(sizeof (*self));
 	self->data = bt;
 	self->update = update;
 	self->draw = draw;