diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-09 20:28:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-09 21:07:39 +0000 |
commit | 2234f541176cad8c7dcc3d732a898f701af979b4 (patch) | |
tree | aa0ce51f3303aff00a47d82ac93ea84501892566 /starmath/source | |
parent | 864f775189c23053bfa6ce8fb051dbc0d71929d9 (diff) |
fix debug=2 build
Change-Id: I0163fe1668d35b3b108f9b57653fa490ae174ee0
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/parse.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 635cf3880213..1ab966b0432f 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -328,12 +328,13 @@ static const sal_Unicode aDelimiterTable[] = bool SmParser::IsDelimiter( const OUString &rTxt, sal_Int32 nPos ) // returns 'true' iff cChar is '\0' or a delimiter { - OSL_ENSURE( nPos <= rTxt.getLength(), "index out of range" ); + assert(nPos <= rTxt.getLength()); //index out of range - sal_Unicode cChar = rTxt[nPos]; - if(!cChar) + if (nPos == rTxt.getLength()) return true; + sal_Unicode cChar = rTxt[nPos]; + // check if 'cChar' is in the delimiter table const sal_Unicode *pDelim = &aDelimiterTable[0]; for ( ; *pDelim != 0; pDelim++) |