mirror of
https://github.com/JesseTG/melonds-ds.git
synced 2024-11-30 18:20:30 +00:00
Fix incorrect condition in retro::get_system_path
- string_views don't include the null terminator if they're constructed from an existing string
This commit is contained in:
parent
e7af37cccd
commit
a3c05f19be
@ -482,7 +482,7 @@ const optional<string>& retro::get_system_directory() {
|
||||
|
||||
optional<string> retro::get_system_path(const string_view& name) noexcept {
|
||||
optional<string> sysdir = retro::get_system_directory();
|
||||
if (!sysdir || name.empty() || name.find('\0')) {
|
||||
if (!sysdir) {
|
||||
// If no system directory is available, or the name is empty or not null-terminated...
|
||||
return nullopt;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user