Merge pull request #4792 from sepalani/fix_isctype_assert

Fixes std::isprint undefined behavior
This commit is contained in:
Mat M 2017-01-31 21:53:12 -05:00 committed by GitHub
commit 84d81a4b7a
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;
}