(svn r26790) [1.4] -Backport from trunk:
- Fix: Loading a game with order backups leaked Orders and left unreachable items in the pool (r26787) - Fix: Buffer overrun in SQCompiler::Error (r26764) - Fix: Desync due to not always properly restoring game state from the savegame (r26753) - Fix: [Script] Crashes and infinite loops when using lists in item-descending order [FS#6085] (r26744)
This commit is contained in:
@@ -354,7 +354,12 @@ public:
|
||||
this->has_no_more_items = true;
|
||||
return;
|
||||
}
|
||||
this->item_iter--;
|
||||
if (this->item_iter == this->list->items.begin()) {
|
||||
/* Use 'end' as marker for 'beyond begin' */
|
||||
this->item_iter = this->list->items.end();
|
||||
} else {
|
||||
this->item_iter--;
|
||||
}
|
||||
if (this->item_iter != this->list->items.end()) item_next = (*this->item_iter).first;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user