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:
Jesse Talavera-Greenberg 2023-08-24 22:19:26 -04:00
parent e7af37cccd
commit a3c05f19be

View File

@ -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;
}