mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-08 23:19:40 +00:00
(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
This commit is contained in:
parent
677946a368
commit
ae9441aa46
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user