fix cctype usage

According to the documentation, we should cast to unsigned char.
Anything negative is undefined behavior.
This commit is contained in:
Megamouse committed 2026-09-15 17:38:26 +02:00
1 parent b6bdf0d92d
commit ca522cf84c
36 files changed
+524 -115

No files matched your search

+3 -2
View File
@@ -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';
}
}