summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lotuswordpro/source/filter/tocread.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index e2421efb0931..203fe79a466f 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -290,7 +290,9 @@ CBenTOCReader::ReadTOC()
return Err;
}
- OString sName(sBuffer, Length);
+ OString sName;
+ if (Length)
+ sName = OString(sBuffer, Length - 1);
CUtListElmt * pPrevNamedObjectListElmt;
if (FindNamedObject(&cpContainer->GetNamedObjects(),