From 705900d38b642122ad90f6e8df53b64d48eff117 Mon Sep 17 00:00:00 2001 From: paxcut <53811119+paxcut@users.noreply.github.com> Date: Sun, 24 Sep 2023 10:58:04 -0700 Subject: [PATCH] includes/std: Fixed std::string::replace (#163) The submitted fix may have been a work in progress version instead of the tested solution I intended to submit. Hopefully this time I'll get it right. --- includes/std/string.pat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/std/string.pat b/includes/std/string.pat index 9325d85..833ce18 100644 --- a/includes/std/string.pat +++ b/includes/std/string.pat @@ -230,7 +230,7 @@ namespace std::string { i = i + 1; } } - result = result + std::string::substr(string,string_len-pattern_len-1,pattern_len); + result = result + std::string::substr(string,string_len-pattern_len+1,pattern_len); return result; };