summaryrefslogtreecommitdiff
path: root/src/match.cpp
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-10-10 09:30:13 +0200
committerDanny Baumann <dannybaumann@web.de>2008-10-10 09:30:13 +0200
commitcbd0a54d8f1c8b7c09406e71a476e19c151328a0 (patch)
tree3b98cafc9cdc979d900907c3fe0f6207b69a4dbd /src/match.cpp
parent0eec98817332db61a0a5450b71d58869cacb6820 (diff)
downloadzcomp-cbd0a54d8f1c8b7c09406e71a476e19c151328a0.tar.gz
zcomp-cbd0a54d8f1c8b7c09406e71a476e19c151328a0.tar.bz2
Avoid exception if match is empty.
Diffstat (limited to 'src/match.cpp')
-rw-r--r--src/match.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/match.cpp b/src/match.cpp
index 5788476..0e26107 100644
--- a/src/match.cpp
+++ b/src/match.cpp
@@ -427,7 +427,8 @@ matchOpsToString (MatchOp::List &list)
}
}
- value.erase (value.length () - 1);
+ if (!value.empty ())
+ value.erase (value.length () - 1);
return value;
}