mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 21:47:00 -04:00
Exception instead of warning
This commit is contained in:
@@ -165,9 +165,7 @@ SCRIPT_FUNCTION_WITH_SIMPLIFY(filter_text) {
|
|||||||
ret.append(pos.first, pos.second); // the match
|
ret.append(pos.first, pos.second); // the match
|
||||||
if (pos.second == start) {
|
if (pos.second == start) {
|
||||||
// regex matched the empty string, would cause an infinite loop
|
// regex matched the empty string, would cause an infinite loop
|
||||||
queue_message(MESSAGE_WARNING, "Regular expression matches empty string in filter_text");
|
throw ScriptError("Regular expression matches empty string");
|
||||||
if (start == input.end()) break;
|
|
||||||
++start;
|
|
||||||
} else {
|
} else {
|
||||||
start = pos.second;
|
start = pos.second;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user