summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/Util.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-11-06 18:12:16 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-11-06 18:12:16 +0000
commit00199254eeb0432469055c0336056d081b4ba40e (patch)
tree5fa596161545dc5642ff6443657647bc7f16a760 /cpp/src/IcePatch2/Util.cpp
parentfixing result printing bug (diff)
downloadice-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.cpp5
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]))
{