diff -r 55c8267c933f -r aefc131bf5ce src/aystar.cpp --- a/src/aystar.cpp Thu Jan 11 13:41:16 2007 +0000 +++ b/src/aystar.cpp Mon Jan 15 20:14:06 2007 +0000 @@ -19,6 +19,7 @@ #include "stdafx.h" #include "openttd.h" #include "aystar.h" +#include "helpers.hpp" int _aystar_stats_open_size; int _aystar_stats_closed_size; @@ -35,7 +36,8 @@ static void AyStarMain_ClosedList_Add(AyStar *aystar, const PathNode *node) { // Add a node to the ClosedList - PathNode *new_node = malloc(sizeof(*new_node)); + PathNode *new_node; + MallocT(&new_node, 1); *new_node = *node; Hash_Set(&aystar->ClosedListHash, node->node.tile, node->node.direction, new_node); } @@ -66,7 +68,8 @@ static void AyStarMain_OpenList_Add(AyStar *aystar, PathNode *parent, const AyStarNode *node, int f, int g) { // Add a new Node to the OpenList - OpenListNode *new_node = malloc(sizeof(*new_node)); + OpenListNode *new_node; + MallocT(&new_node, 1); new_node->g = g; new_node->path.parent = parent; new_node->path.node = *node;