mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 22:41:25 +12:00
prevent overflow becaus wxStrings aren't \0 terminated anymore
This commit is contained in:
parent
b9abb1e075
commit
3f52a6aa50
8 changed files with 12 additions and 31 deletions
|
@ -54,12 +54,12 @@ bool vfsLocalFile::Open(const wxString& path, vfsOpenMode mode)
|
|||
bool vfsLocalFile::Create(const wxString& path)
|
||||
{
|
||||
ConLog.Warning("vfsLocalFile::Create('%s')", path.c_str());
|
||||
for(uint p=1; path[p] != '\0'; p++)
|
||||
for(uint p=1; p < path.Len() && path[p] != '\0' ; p++)
|
||||
{
|
||||
for(; path[p] != '\0'; p++)
|
||||
for(; p < path.Len() && path[p] != '\0'; p++)
|
||||
if(path[p] == '\\') break;
|
||||
|
||||
if(path[p] == '\0')
|
||||
if(p == path.Len() || path[p] == '\0')
|
||||
break;
|
||||
|
||||
const wxString& dir = path(0, p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue