diff --git a/src/core/file_sys/fs.cpp b/src/core/file_sys/fs.cpp index f2fda657..c6bdf7ad 100644 --- a/src/core/file_sys/fs.cpp +++ b/src/core/file_sys/fs.cpp @@ -132,8 +132,12 @@ File* HandleTable::GetFile(int d) { } File* HandleTable::GetFile(const std::filesystem::path& host_name) { - const auto it = std::ranges::find(m_files, host_name, &File::m_host_name); - return it == m_files.end() ? nullptr : *it; + for (auto* file : m_files) { + if (file != nullptr && file->m_host_name == host_name) { + return file; + } + } + return nullptr; } } // namespace Core::FileSys