1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Fix for RegEx.sub truncating string when 'end' is used

(cherry picked from commit 46b420f7ee)
This commit is contained in:
Sofox
2023-12-12 00:07:07 +00:00
committed by Rémi Verschelde
parent 3971cbcff0
commit b3b961247f
2 changed files with 13 additions and 1 deletions

View File

@@ -334,7 +334,7 @@ String RegEx::sub(const String &p_subject, const String &p_replacement, bool p_a
return String();
}
return String(output.ptr(), olength);
return String(output.ptr(), olength) + p_subject.substr(length);
}
bool RegEx::is_valid() const {