Merge pull request #5214 from sepalani/strutil-fix
StringUtil: Fix a ctype assertion
This commit is contained in:
commit
9a7c28026b
|
@ -12,6 +12,7 @@
|
|||
#include <istream>
|
||||
#include <iterator>
|
||||
#include <limits.h>
|
||||
#include <locale>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -63,7 +64,7 @@ std::string HexDump(const u8* data, size_t size)
|
|||
if (row_start + i < size)
|
||||
{
|
||||
char c = static_cast<char>(data[row_start + i]);
|
||||
out += StringFromFormat("%c", isprint(c) ? c : '.');
|
||||
out += std::isprint(c, std::locale::classic()) ? c : '.';
|
||||
}
|
||||
}
|
||||
out += "\n";
|
||||
|
|
Loading…
Reference in New Issue