diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-10-28 06:48:46 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-10-28 06:49:07 -0400 |
commit | f1e2f2a85962c1664e4e55471061af0eaa798d40 (patch) | |
tree | 5d4c9a91453db71570998a96385b4e9090f1e14c /src/qt/platformstyle.cpp | |
parent | 643b25d093a959b2176a7ace810a7d44267ca2e9 (diff) | |
parent | 15db77f4dd7f1a7963398f1576580b577a1697bc (diff) |
Merge #14585: refactor: remove usage of locale dependent std::isspace
15db77f4dd Don't rely on locale dependent functions in base_blob<BITS>::SetHex(...) (uint256), DecodeBase58(...), ParseMoney(...) and ParseHex(...) (practicalswift)
Pull request description:
Don't rely on locale dependent function `std::isspace` in `base_blob<BITS>::SetHex(...)` (uint256), `DecodeBase58(...)`, `ParseMoney(...)` and `ParseHex(...)`.
Rationale:
```
$ uname -s
Darwin
$ cat poc.cpp
#include <iostream>
#include <locale>
int main(void) {
setlocale(LC_ALL, "");
std::cout << std::isspace(133) << ' ' << std::isspace(154) << ' ' << std::isspace(160);
std::cout << '\n';
}
$ clang++ -o poc poc.cpp
$ ./poc
1 0 1
$ LC_ALL=en_US ./poc
1 0 1
$ LC_ALL=C ./poc
0 0 0
$ LC_ALL=ru_RU.KOI8-R ./poc # an "interesting" locale
0 1 0
```
Tree-SHA512: 4eafb267342b8a777da6cca07c353afd1f90f3fc1d91e01f526f1b384a2b97c1da25b7bd7dfc300655182a4eaec6a4bea855a45723ab53c750a734b60e1e3c9f
Diffstat (limited to 'src/qt/platformstyle.cpp')
0 files changed, 0 insertions, 0 deletions