Fixes std::isprint undefined behavior
This commit is contained in:
parent
1603191145
commit
44196f6a55
|
@ -5,8 +5,8 @@
|
|||
#include "Core/Core.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include <locale>
|
||||
#include <mutex>
|
||||
#include <queue>
|
||||
#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
|
||||
for (const char& c : message)
|
||||
{
|
||||
if (!std::isprint(c))
|
||||
if (!std::isprint(c, std::locale::classic()))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue