diff -r 2d4126d81ebb -r 167d9a91ef02 src/ai/ai.cpp --- a/src/ai/ai.cpp Wed Jan 10 18:44:52 2007 +0000 +++ b/src/ai/ai.cpp Wed Jan 10 18:56:51 2007 +0000 @@ -5,6 +5,7 @@ #include "../variables.h" #include "../command.h" #include "../network/network.h" +#include "../helpers.hpp" #include "ai.h" #include "default/default.h" @@ -50,11 +51,11 @@ if (_ai_player[player].queue_tail == NULL) { /* There is no item in the queue yet, create the queue */ - _ai_player[player].queue = malloc(sizeof(AICommand)); + MallocT(&_ai_player[player].queue, 1); _ai_player[player].queue_tail = _ai_player[player].queue; } else { /* Add an item at the end */ - _ai_player[player].queue_tail->next = malloc(sizeof(AICommand)); + MallocT(&_ai_player[player].queue_tail->next, 1); _ai_player[player].queue_tail = _ai_player[player].queue_tail->next; }