diff options
Diffstat (limited to 'cpp/src/IceUtil/Options.cpp')
-rw-r--r-- | cpp/src/IceUtil/Options.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cpp/src/IceUtil/Options.cpp b/cpp/src/IceUtil/Options.cpp index 444c71d96cc..9c79e5b1130 100644 --- a/cpp/src/IceUtil/Options.cpp +++ b/cpp/src/IceUtil/Options.cpp @@ -455,7 +455,7 @@ IceUtilInternal::Options::split(const string& line) // case 'x': { - if(i < l.size() - 1 && !isxdigit(l[i + 1])) + if(i < l.size() - 1 && !isxdigit(static_cast<unsigned char>(l[i + 1]))) { arg.push_back('\\'); arg.push_back('x'); @@ -464,14 +464,15 @@ IceUtilInternal::Options::split(const string& line) Int64 ull = 0; string::size_type j; - for(j = i + 1; j < i + 3 && j < l.size() && isxdigit(c = l[j]); ++j) + for(j = i + 1; j < i + 3 && j < l.size() && + isxdigit(static_cast<unsigned char>(c = l[j])); ++j) { ull *= 16; - if(isdigit(c)) + if(isdigit(static_cast<unsigned char>(c))) { ull += c - '0'; } - else if(islower(c)) + else if(islower(static_cast<unsigned char>(c))) { ull += c - 'a' + 10; } @@ -491,9 +492,9 @@ IceUtilInternal::Options::split(const string& line) case 'c': { c = l[++i]; - if(isalpha(c) || c == '@' || (c >= '[' && c <= '_')) + if(isalpha(static_cast<unsigned char>(c)) || c == '@' || (c >= '[' && c <= '_')) { - arg.push_back(static_cast<char>(toupper(c) - '@')); + arg.push_back(static_cast<char>(toupper(static_cast<unsigned char>(c)) - '@')); } else { |