summaryrefslogtreecommitdiff
path: root/oldloader.c
diff options
context:
space:
mode:
Diffstat (limited to 'oldloader.c')
-rw-r--r--oldloader.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/oldloader.c b/oldloader.c
index 08165476f..b46fd3c90 100644
--- a/oldloader.c
+++ b/oldloader.c
@@ -803,6 +803,9 @@ static void FixOrder(uint16 *o, int num)
int i;
for (i = 0; i < num; ++i) {
+ if (!AddBlockIfNeeded(&_order_pool, i))
+ error("Orders: failed loading savegame: too many orders");
+
order = GetOrder(i);
AssignOrder(order, UnpackOldOrder(*o));
/* Recover the next list */