diff options
| author | Yong He <yonghe@outlook.com> | 2024-12-10 03:49:38 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-10 19:49:38 +0800 |
| commit | 89bf795f105ebe2703ee74a021e16786990ca7b2 (patch) | |
| tree | 59f9900680f40c6bd91a4511cdab032840c98336 /source/core | |
| parent | b0dfb1aef2cd5483f59b858c8921707174ffdf2d (diff) | |
Fix a crash when search for files. (#5818)
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-string-util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/core/slang-string-util.cpp b/source/core/slang-string-util.cpp index 6f1dc2ccb..ba234e30b 100644 --- a/source/core/slang-string-util.cpp +++ b/source/core/slang-string-util.cpp @@ -461,7 +461,7 @@ String StringUtil::replaceAll( StringBuilder builder; for (Index i = 0; i < text.getLength();) { - if (i + subStr.getLength() >= text.getLength()) + if (i + subStr.getLength() > text.getLength()) { builder.append(text.subString(i, text.getLength() - i)); break; |
