Fixes std::isprint undefined behavior
This commit is contained in:
parent
1603191145
commit
44196f6a55
|
@ -5,8 +5,8 @@
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <cctype>
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <locale>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
@ -178,7 +178,7 @@ void DisplayMessage(const std::string& message, int time_in_ms)
|
||||||
// Actually displaying non-ASCII could cause things to go pear-shaped
|
// Actually displaying non-ASCII could cause things to go pear-shaped
|
||||||
for (const char& c : message)
|
for (const char& c : message)
|
||||||
{
|
{
|
||||||
if (!std::isprint(c))
|
if (!std::isprint(c, std::locale::classic()))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue