From c872ac4eb4adf6bf4920f5a1db1756d8224bf412 Mon Sep 17 00:00:00 2001 From: truelight Date: Fri, 9 Dec 2005 19:12:11 +0000 Subject: [PATCH] (svn r3278) -Fix: lets update the tail-pointer if we add a new item, else the linkedlist never grows ;) --- ai/ai.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ai/ai.c b/ai/ai.c index 4e1545e772..27da823377 100644 --- a/ai/ai.c +++ b/ai/ai.c @@ -153,8 +153,10 @@ int32 AI_DoCommandChecked(uint tile, uint32 p1, uint32 p2, uint32 flags, uint pr /* Add it to the back of the list */ if (command_uid_tail[_current_player] == NULL) command_uid_tail[_current_player] = new; - else + else { command_uid_tail[_current_player]->next = new; + command_uid_tail[_current_player] = new; + } if (command_uid[_current_player] == NULL) command_uid[_current_player] = new;