From de9286a760ef625cc2878a8a55012e4f6e965bc0 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 11 Jan 2009 20:40:43 +0000 Subject: [PATCH] replace std::isdigit() to avoid asserts on windows --- src/identify_client.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/identify_client.cpp b/src/identify_client.cpp index 0e7cbb138..93a243d98 100644 --- a/src/identify_client.cpp +++ b/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; }