diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/core/slang-string-util.cpp | 2 | ||||
| -rw-r--r-- | source/slang/slang.cpp | 2 |
2 files changed, 2 insertions, 2 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; diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index e4de61276..9e9b5fbe3 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -4257,7 +4257,7 @@ SourceFile* Linkage::findFile(Name* name, SourceLoc loc, IncludeSystem& outInclu // Next, try to find the file of the given name, // using our ordinary include-handling logic. - auto searchDirs = getSearchDirectories(); + auto& searchDirs = getSearchDirectories(); outIncludeSystem = IncludeSystem(&searchDirs, getFileSystemExt(), getSourceManager()); // Get the original path info |
