mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 05:36:59 -04:00
Fix: check starting_age <= age, instead of starting_age < age. Otherwise we can get into an infinite loop.
This commit is contained in:
@@ -321,7 +321,7 @@ void SetScriptManager::updateRecursive(deque<ToUpdate>& to_update, Age starting_
|
|||||||
|
|
||||||
void SetScriptManager::updateToUpdate(const ToUpdate& u, deque<ToUpdate>& to_update, Age starting_age) {
|
void SetScriptManager::updateToUpdate(const ToUpdate& u, deque<ToUpdate>& to_update, Age starting_age) {
|
||||||
Age age = u.value->last_script_update;
|
Age age = u.value->last_script_update;
|
||||||
if (starting_age < age) return; // this value was already updated
|
if (starting_age <= age) return; // this value was already updated
|
||||||
Context& ctx = getContext(u.card);
|
Context& ctx = getContext(u.card);
|
||||||
bool changes = false;
|
bool changes = false;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ public:
|
|||||||
/// Compare two ages, smaller means earlier
|
/// Compare two ages, smaller means earlier
|
||||||
inline bool operator < (Age a) const { return age < a.age; }
|
inline bool operator < (Age a) const { return age < a.age; }
|
||||||
/// Compare two ages
|
/// Compare two ages
|
||||||
|
inline bool operator <= (Age a) const { return age <= a.age; }
|
||||||
|
/// Compare two ages
|
||||||
inline bool operator == (Age a) const { return age == a.age; }
|
inline bool operator == (Age a) const { return age == a.age; }
|
||||||
|
|
||||||
/// A number corresponding to the age
|
/// A number corresponding to the age
|
||||||
|
|||||||
Reference in New Issue
Block a user