mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
Qt: fix user manager directory scan
This commit is contained in:
parent
2f6957c9c8
commit
c39bd490ba
1 changed files with 3 additions and 3 deletions
|
@ -23,11 +23,11 @@ namespace
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is the folder name exactly 8 all-numerical characters long?
|
// Is the folder name exactly 8 all-numerical characters long?
|
||||||
// We use strtol to find any non-numeric characters in folder name.
|
// We use strtoul to find any non-numeric characters in folder name.
|
||||||
char* non_numeric_char;
|
char* non_numeric_char;
|
||||||
u32 key = static_cast<u32>(std::strtol(user_folder.name.c_str(), &non_numeric_char, 10));
|
const u32 key = static_cast<u32>(std::strtoul(user_folder.name.c_str(), &non_numeric_char, 10));
|
||||||
|
|
||||||
if (user_folder.name.length() != 8 || *non_numeric_char != '\0')
|
if (key == 0 || user_folder.name.length() != 8 || *non_numeric_char != '\0')
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue