summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2001-02-23 13:29:28 +0000
committerjp <jp@openoffice.org>2001-02-23 13:29:28 +0000
commit5fb0f7396c6780f77b9782f9c75635abc6f90bd8 (patch)
tree10d40523ac8b580b1ed069113ef9b24451d516f3 /sw
parent9b3a1e9b0c263e94c867b8006eeff87dddb96bce (diff)
GetScriptType: assert for wrong indizies
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/edit/edattr.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index ccb530fcdca9..11e0ceb41a46 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: edattr.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: jp $ $Date: 2001-02-20 09:23:41 $
+ * last change: $Author: jp $ $Date: 2001-02-23 14:29:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -506,6 +506,9 @@ USHORT SwEditShell::GetScriptType() const
nLen = aIdx == nEnd
? pEnd->nContent.GetIndex()
: rTxt.Len();
+ ASSERT( nLen <= rTxt.Len(), "Index outside the range - endless loop!" );
+ if( nLen > rTxt.Len() )
+ nLen = rTxt.Len();
USHORT nScript = pBreakIt->xBreak->getScriptType(
rTxt, nChg );