summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Martens <ama@openoffice.org>2000-09-22 10:40:34 +0000
committerAndreas Martens <ama@openoffice.org>2000-09-22 10:40:34 +0000
commit68c613f89fee57bf216ab834a28c4e7776304a62 (patch)
tree8b1cb77e41fcd5226caafee14e471564d4cc54da
parent2ce227610eab9f2c425ba5c0cac9bf073c576d80 (diff)
Fix #78708#: I normally don't exspect a null character inside a string,
but this causes a loop. Now is more robust.
-rw-r--r--sw/source/core/text/inftxt.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 54572000cdc6..a5e45bede697 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: inftxt.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-19 00:08:25 $
+ * last change: $Author: ama $ $Date: 2000-09-22 11:40:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -940,8 +940,12 @@ xub_StrLen SwTxtFormatInfo::ScanPortionEnd( const xub_StrLen nEnd, sal_Bool bSki
default:
if( cTabDec == cPos )
{
- cHookChar = cPos;
- return i;
+ ASSERT( cPos, "Unexspected end of string" );
+ if( cPos ) // robust
+ {
+ cHookChar = cPos;
+ return i;
+ }
}
}
}