summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/Util.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2008-11-05 12:21:24 -0330
committerDwayne Boone <dwayne@zeroc.com>2008-11-05 12:21:24 -0330
commite67bc9d134e2727e1da51729665c672904daf6c0 (patch)
tree784284319746e5e4a807c469c50ed5c8b671193d /cpp/src/IcePatch2/Util.cpp
parentMerge branch 'R3_3_branch' (diff)
parentBug 3386 - slice errors with wrong line numbers (diff)
downloadice-e67bc9d134e2727e1da51729665c672904daf6c0.tar.bz2
ice-e67bc9d134e2727e1da51729665c672904daf6c0.tar.xz
ice-e67bc9d134e2727e1da51729665c672904daf6c0.zip
Merge branch 'R3_3_branch'
Diffstat (limited to 'cpp/src/IcePatch2/Util.cpp')
-rw-r--r--cpp/src/IcePatch2/Util.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp
index 2b572c27e57..f4f6c32ddf6 100644
--- a/cpp/src/IcePatch2/Util.cpp
+++ b/cpp/src/IcePatch2/Util.cpp
@@ -280,7 +280,8 @@ IcePatch2::simplify(const string& path)
}
if(result == "/." ||
- (result.size() == 4 && isalpha(result[0]) && result[1] == ':' && result[2] == '/' && result[3] == '.'))
+ (result.size() == 4 && isalpha(static_cast<unsigned char>(result[0])) && result[1] == ':' &&
+ result[2] == '/' && result[3] == '.'))
{
return result.substr(0, result.size() - 1);
}
@@ -290,7 +291,8 @@ IcePatch2::simplify(const string& path)
result.erase(result.size() - 2, 2);
}
- if(result == "/" || (result.size() == 3 && isalpha(result[0]) && result[1] == ':' && result[2] == '/'))
+ if(result == "/" || (result.size() == 3 && isalpha(static_cast<unsigned char>(result[0])) && result[1] == ':' &&
+ result[2] == '/'))
{
return result;
}
@@ -313,7 +315,8 @@ IcePatch2::isRoot(const string& pa)
{
string path = simplify(pa);
#ifdef _WIN32
- return path == "/" || path.size() == 3 && isalpha(path[0]) && path[1] == ':' && path[2] == '/';
+ return path == "/" || path.size() == 3 && isalpha(static_cast<unsigned char>(path[0])) && path[1] == ':' &&
+ path[2] == '/';
#else
return path == "/";
#endif