mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
VFS: Fix some potential .back() segfaults
This commit is contained in:
parent
10c52cf569
commit
0d1fbfb755
3 changed files with 26 additions and 10 deletions
|
@ -772,7 +772,7 @@ bool fs::create_path(const std::string& path)
|
|||
|
||||
#ifdef _WIN32
|
||||
// Workaround: don't call is_dir with naked drive letter
|
||||
if (parent.size() < path.size() && parent.back() != ':' && !is_dir(parent) && !create_path(parent))
|
||||
if (parent.size() < path.size() && (parent.empty() || (parent.back() != ':' && !is_dir(parent) && !create_path(parent))))
|
||||
#else
|
||||
if (parent.size() < path.size() && !is_dir(parent) && !create_path(parent))
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue