diff options
| author | JosJuice <josjuice@gmail.com> | 2020-01-16 17:50:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-16 17:50:07 +0100 |
| commit | dd7f9ed5da142f91ba20da38c074033c7342af65 (patch) | |
| tree | bfab21acea4cfb34c2ad7b9543bce92eb5a4ac79 /Source/Core/DiscIO/VolumeWad.cpp | |
| parent | 1cc7ef356b9a33814efb290368150a1cceb0a3ed (diff) | |
| parent | 89b0ab2d22db510e799e6f9619e8c8e0678f13ef (diff) | |
Merge pull request #8566 from leoetlino/isprint-ub
StringUtil: Add IsPrintableCharacter and use it (and fix UB in MemoryViewWidget)
Diffstat (limited to 'Source/Core/DiscIO/VolumeWad.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeWad.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Core/DiscIO/VolumeWad.cpp b/Source/Core/DiscIO/VolumeWad.cpp index e471edcd1d..584ae3b5b7 100644 --- a/Source/Core/DiscIO/VolumeWad.cpp +++ b/Source/Core/DiscIO/VolumeWad.cpp @@ -5,7 +5,6 @@ #include <algorithm> #include <cstddef> #include <cstring> -#include <locale> #include <map> #include <memory> #include <optional> @@ -261,8 +260,7 @@ std::string VolumeWAD::GetMakerID(const Partition& partition) const return "00"; // Some weird channels use 0x0000 in place of the MakerID, so we need a check here - const std::locale& c_locale = std::locale::classic(); - if (!std::isprint(temp[0], c_locale) || !std::isprint(temp[1], c_locale)) + if (!IsPrintableCharacter(temp[0]) || !IsPrintableCharacter(temp[1])) return "00"; return DecodeString(temp); |
