From 768c22386fb085d1dc57cf943e1e36eb93002cf5 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 19 Oct 2026 09:21:50 -0700 Subject: [PATCH 1/2] [NFC] Do a string search using a character rather than a full string --- src/support/string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/support/string.cpp b/src/support/string.cpp index bdb54f11f94..c4743619e8d 100644 --- a/src/support/string.cpp +++ b/src/support/string.cpp @@ -22,7 +22,7 @@ namespace wasm::String { Split::Split(const std::string& input, const NewLineOr& newLineOrDelim) { - auto first = input.find("\n", 0); + auto first = input.find('\n', 0); if (first != std::string::npos && first != input.length() - 1) { split(input, "\n"); } else { From 2fa40bf2be247ff2c41e0593a053c6831b2830b0 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 19 Oct 2026 09:28:08 -0700 Subject: [PATCH 2/2] use default 0 --- src/support/string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/support/string.cpp b/src/support/string.cpp index c4743619e8d..e823bdb6d0a 100644 --- a/src/support/string.cpp +++ b/src/support/string.cpp @@ -22,7 +22,7 @@ namespace wasm::String { Split::Split(const std::string& input, const NewLineOr& newLineOrDelim) { - auto first = input.find('\n', 0); + auto first = input.find('\n'); if (first != std::string::npos && first != input.length() - 1) { split(input, "\n"); } else {