diff options
author | yexo <yexo@openttd.org> | 2009-09-04 22:25:12 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-09-04 22:25:12 +0000 |
commit | ae9441aa4628e2e559ea8f7e490e13ea0be34bab (patch) | |
tree | 826de24043edc826d3213ce8c8de78e9fe394ccc /src/saveload | |
parent | 677946a368aca5f18b95213f59a8fa4df79da158 (diff) | |
download | openttd-ae9441aa4628e2e559ea8f7e490e13ea0be34bab.tar.xz |
(svn r17419) -Fix (r-old, r16378): the index of orders loaded from old savegames was owerwritten with an unitialized value, causing asserts. The issue has present for a long time but only since the new pool system did it trigger a (correct) assert
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index 36b757937..1620ea169 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -607,7 +607,8 @@ static bool LoadOldOrder(LoadgameState *ls, int num) { if (!LoadChunk(ls, NULL, order_chunk)) return false; - Order *o = new (num) Order(UnpackOldOrder(_old_order)); + Order *o = new (num) Order(); + o->AssignOrder(UnpackOldOrder(_old_order)); if (o->IsType(OT_NOTHING)) { delete o; |