Fixes std::isprint undefined behavior

This commit is contained in:
Sepalani 2017-01-30 22:49:21 +00:00
parent 1603191145
commit 44196f6a55
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}