mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Made spec_sort specifications featuring more than one '()' not hang.
Added error window if a script error occurs while loading a set. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@412 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -510,7 +510,7 @@ String spec_sort(const String& spec, const String& input) {
|
||||
pos = end;
|
||||
|
||||
} else if (c == _('(')) { // in a cycle
|
||||
size_t end = spec.find_first_of(_(')'));
|
||||
size_t end = spec.find_first_of(_(')'), pos);
|
||||
if (end == String::npos) throw ParseError(_("Expected ')' in sort_rule specification"));
|
||||
ret += cycle_sort(spec.substr(pos + 1, end - pos - 1), input);
|
||||
pos = end;
|
||||
|
||||
Reference in New Issue
Block a user