aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PropSet.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/PropSet.cxx')
-rw-r--r--src/PropSet.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/PropSet.cxx b/src/PropSet.cxx
index 7e2a906a4..8582105ea 100644
--- a/src/PropSet.cxx
+++ b/src/PropSet.cxx
@@ -27,6 +27,7 @@ bool EqualCaseInsensitive(const char *a, const char *b) {
// Get a line of input. If end of line escaped with '\\' then continue reading.
static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) {
bool continuation = true;
+ s[0] = '\0';
while ((len > 1) && lenData > 0) {
char ch = *fpc;
fpc++;
@@ -46,6 +47,7 @@ static bool GetFullLine(const char *&fpc, int &lenData, char *s, int len) {
} else {
continuation = false;
*s++ = ch;
+ *s = '\0';
len--;
}
}
@@ -253,6 +255,9 @@ void PropSet::ReadFromMemory(const char *data, int len) {
if (isalpha(linebuf[0]))
Set(linebuf);
}
+ // If there is a final line:
+ if (isalpha(linebuf[0]))
+ Set(linebuf);
}
}