diff options
Diffstat (limited to 'cpp/src/IceUtil/InputUtil.cpp')
-rw-r--r-- | cpp/src/IceUtil/InputUtil.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/IceUtil/InputUtil.cpp b/cpp/src/IceUtil/InputUtil.cpp index d4d6253b589..5d5f8a616d0 100644 --- a/cpp/src/IceUtil/InputUtil.cpp +++ b/cpp/src/IceUtil/InputUtil.cpp @@ -58,7 +58,7 @@ strToInt64Impl(const char* s, char** endptr, int base) // // Skip leading whitespace // - while(*s && isspace(*s)) + while(*s && isspace(static_cast<unsigned char>(*s))) { ++s; } @@ -127,12 +127,12 @@ strToInt64Impl(const char* s, char** endptr, int base) bool overflow = false; bool digitFound = false; const string validDigits(allDigits.begin(), allDigits.begin() + base); - while(*s && validDigits.find_first_of(toupper(*s)) != validDigits.npos) + while(*s && validDigits.find_first_of(toupper(static_cast<unsigned char>(*s))) != validDigits.npos) { digitFound = true; if(!overflow) { - int digit = digitVal[toupper(*s) - '0']; + int digit = digitVal[toupper(static_cast<unsigned char>(*s)) - '0']; assert(digit != 100); if(result < _I64_MAX / base) { |