diff options
| author | Sepalani <sepalani@hotmail.fr> | 2017-01-30 22:49:21 +0000 |
|---|---|---|
| committer | Sepalani <sepalani@hotmail.fr> | 2017-02-01 02:30:29 +0000 |
| commit | 44196f6a55ef89db917075fb5d7beeda4635b0fa (patch) | |
| tree | 79bbf2336558c8d0989086cf5e7a3028c75d885a /Source | |
| parent | 16031911454224375468ee5aade7fe4701e49930 (diff) | |
Fixes std::isprint undefined behavior
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/Core.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 6eba2560cf..c32b0b6d33 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -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; } |
