Merge pull request #4792 from sepalani/fix_isctype_assert
Fixes std::isprint undefined behavior
This commit is contained in:
commit
84d81a4b7a
|
@ -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