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:
coppro
2007-05-23 00:47:18 +00:00
parent 9762524025
commit 06138ee325
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -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;