diff options
Diffstat (limited to 'libtorrent/src/identify_client.cpp')
-rwxr-xr-x | libtorrent/src/identify_client.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libtorrent/src/identify_client.cpp b/libtorrent/src/identify_client.cpp index 9eb0fd3c9..1b0b3be67 100755 --- a/libtorrent/src/identify_client.cpp +++ b/libtorrent/src/identify_client.cpp @@ -53,9 +53,14 @@ namespace using namespace libtorrent; + bool is_digit(char c) + { + return c >= '0' && c <= '9'; + } + int decode_digit(char c) { - if (std::isdigit(c)) return c - '0'; + if (is_digit(c)) return c - '0'; return unsigned(c) - 'A' + 10; } |