Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
Change length check and substr to ends_with when comparing the sd:/ p…
Browse files Browse the repository at this point in the history
…refix
  • Loading branch information
vswarte committed Jan 13, 2024
1 parent 94a71f5 commit 8a857f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modengine/ext/mod_loader/wwise_file_overrides.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ std::optional<fs::path> find_override(const std::wstring filename)
}

std::optional<std::wstring> normalize_filename(const std::wstring path) {
if (path.length() > 3 && path.substr(0, 4) == L"sd:/") {
if (path.starts_with(L"sd:/")) {
return std::wstring(path.substr(4));
}

Expand Down

0 comments on commit 8a857f8

Please sign in to comment.