diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-11-06 18:12:16 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-11-06 18:12:16 +0000 |
commit | 00199254eeb0432469055c0336056d081b4ba40e (patch) | |
tree | 5fa596161545dc5642ff6443657647bc7f16a760 /cpp/src/IcePatch2/Util.cpp | |
parent | fixing result printing bug (diff) | |
download | ice-00199254eeb0432469055c0336056d081b4ba40e.tar.bz2 ice-00199254eeb0432469055c0336056d081b4ba40e.tar.xz ice-00199254eeb0432469055c0336056d081b4ba40e.zip |
Fixed bug where isAbsolute would try to access pa[0] even if pa was empty
Diffstat (limited to 'cpp/src/IcePatch2/Util.cpp')
-rw-r--r-- | cpp/src/IcePatch2/Util.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp index d429f3d3768..2462007df90 100644 --- a/cpp/src/IcePatch2/Util.cpp +++ b/cpp/src/IcePatch2/Util.cpp @@ -340,6 +340,11 @@ IcePatch2::simplify(const string& path) bool IcePatch2::isAbsolute(const string& pa) { + if(pa.empty()) + { + return false; + } + unsigned i = 0; while(isspace(pa[i])) { |