mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-10-18 08:50:17 +02:00
fix cctype usage
According to the documentation, we should cast to unsigned char. Anything negative is undefined behavior.
This commit is contained in:
1 parent
b6bdf0d92d
commit
ca522cf84c
36 files changed
+524
-115
No files matched your search
@@ -96,6 +96,7 @@ DYNAMIC_IMPORT_RENAME("Kernel32.dll", SetThreadDescriptionImport, "SetThreadDesc
|
||||
#include "util/asm.hpp"
|
||||
#include "util/v128.hpp"
|
||||
#include "util/simd.hpp"
|
||||
#include "util/cctype.hpp"
|
||||
#include "util/sysinfo.hpp"
|
||||
#include "Emu/Memory/vm_locking.h"
|
||||
|
||||
@@ -185,9 +186,9 @@ bool IsDebuggerPresent()
|
||||
|
||||
for (const char* cp = status.data() + found + 10; cp <= status.data() + num_read; ++cp)
|
||||
{
|
||||
if (!std::isspace(*cp))
|
||||
if (!utils::isspace(*cp))
|
||||
{
|
||||
return std::isdigit(*cp) != 0 && *cp != '0';
|
||||
return utils::isdigit(*cp) != 0 && *cp != '0';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user