(svn r9540) -Fix (r1): Bankrupt AIs no longer buy themselves (usage of wrong variable)
authorcelestar
Sun, 01 Apr 2007 10:54:31 +0000
changeset 6900 872757461d92
parent 6899 9fef750f15c5
child 6901 2201a832ae42
(svn r9540) -Fix (r1): Bankrupt AIs no longer buy themselves (usage of wrong variable)
src/ai/default/default.cpp
--- a/src/ai/default/default.cpp	Sat Mar 31 12:19:22 2007 +0000
+++ b/src/ai/default/default.cpp	Sun Apr 01 10:54:31 2007 +0000
@@ -3822,7 +3822,7 @@
 		if (best_pl->player_money >> 1 >= p->bankrupt_value) {
 			// Computer wants to buy it.
 			PlayerID old_p = _current_player;
-			_current_player = p->index;
+			_current_player = best_pl->index;
 			DoCommand(0, old_p, 0, DC_EXEC, CMD_BUY_COMPANY);
 			_current_player = old_p;
 		}