Kaydet (Commit) d5b05caf authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Caolán McNamara

starmath: Replace OSL_ENSURE with assert

as negative n would be undefined for OUString::copy(..., n).

Change-Id: I950ec60656142450a5d5f6804324f6080c9c4c2a
Reviewed-on: https://gerrit.libreoffice.org/26753Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 9742ee52
......@@ -460,7 +460,7 @@ void SmParser::NextToken()
--aRes.EndPos;
}
sal_Int32 n = aRes.EndPos - nRealStart;
OSL_ENSURE( n >= 0, "length < 0" );
assert(n >= 0);
m_aCurToken.eType = TNUMBER;
m_aCurToken.cMathChar = '\0';
m_aCurToken.nGroup = TG::NONE;
......@@ -482,7 +482,7 @@ void SmParser::NextToken()
else if (aRes.TokenType & KParseType::IDENTNAME)
{
sal_Int32 n = aRes.EndPos - nRealStart;
OSL_ENSURE( n >= 0, "length < 0" );
assert(n >= 0);
OUString aName( m_aBufferString.copy( nRealStart, n ) );
const SmTokenTableEntry *pEntry = GetTokenTableEntry( aName );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment