src/ai/ai.cpp
branchcustombridgeheads
changeset 5650 aefc131bf5ce
parent 5649 55c8267c933f
child 5860 7fdc9b423ba1
--- a/src/ai/ai.cpp	Thu Jan 11 13:41:16 2007 +0000
+++ b/src/ai/ai.cpp	Mon Jan 15 20:14:06 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;
 	}