Mercurial > hg > openttd
changeset 12926:fb762288aac2 draft
(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
author | yexo <yexo@openttd.org> |
---|---|
date | Fri, 04 Sep 2009 22:25:12 +0000 |
parents | 198ef12ba216 |
children | 950767ea4ee5 |
files | src/saveload/oldloader_sl.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -607,7 +607,8 @@ { 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;