Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxhmikosr <xhmikosr@yahoo.com>2012-08-10 11:36:58 +0400
committerxhmikosr <xhmikosr@yahoo.com>2012-08-10 19:00:49 +0400
commit22815f64aabb6b4a4ca88e51606823ad87663a13 (patch)
treec1e4aefef578e06802aeb42d99d232e44fa4aaad /src/DSUtil/text.cpp
parent096b8b9cb9d739284595ea9a71535336e872d34e (diff)
fix the C6328 warnings found with /analyze
'char' passed as parameter '1' when 'unsigned char' is required in call to 'isupper' 'char' passed as parameter '1' when 'unsigned char' is required in call to 'isspace'
Diffstat (limited to 'src/DSUtil/text.cpp')
-rw-r--r--src/DSUtil/text.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/DSUtil/text.cpp b/src/DSUtil/text.cpp
index fb75d4a3c..92825d5a2 100644
--- a/src/DSUtil/text.cpp
+++ b/src/DSUtil/text.cpp
@@ -100,8 +100,8 @@ CStringA UrlDecode(CStringA str, bool fRaw)
CHAR* s1 = s;
CHAR* s2 = s;
while (s1 < e) {
- CHAR s11 = (s1 < e - 1) ? (__isascii(s1[1]) && isupper(s1[1]) ? tolower(s1[1]) : s1[1]) : 0;
- CHAR s12 = (s1 < e - 2) ? (__isascii(s1[2]) && isupper(s1[2]) ? tolower(s1[2]) : s1[2]) : 0;
+ CHAR s11 = (s1 < e - 1) ? (__isascii(s1[1]) && isupper(static_cast<unsigned char>(s1[1])) ? tolower(s1[1]) : s1[1]) : 0;
+ CHAR s12 = (s1 < e - 2) ? (__isascii(s1[2]) && isupper(static_cast<unsigned char>(s1[2])) ? tolower(s1[2]) : s1[2]) : 0;
if (*s1 == '%' && s1 < e - 2
&& (s1[1] >= '0' && s1[1] <= '9' || s11 >= 'a' && s11 <= 'f')