aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/PropSet.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/PropSet.cxx b/src/PropSet.cxx
index 294d08e11..9936c39d1 100644
--- a/src/PropSet.cxx
+++ b/src/PropSet.cxx
@@ -168,7 +168,7 @@ char *PropSetSimple::ToString() const {
int PropSetSimple::GetInt(const char *key, int defaultValue) const {
char *val = Expanded(key);
if (val) {
- int retVal = atoi(val);
+ int retVal = val[0] ? atoi(val) : defaultValue;
delete []val;
return retVal;
}