avoid calling OUString::copy() with length being -1
Which asserts in dbgutil build. Change-Id: I0f8205ae98c5a57c430b7d8a574e4c0019855841
This commit is contained in:
parent
a5824fa97c
commit
dc7ca91a04
@ -491,9 +491,8 @@ bool SbiScanner::NextSym()
|
|||||||
if( *pLine == cSep )
|
if( *pLine == cSep )
|
||||||
{
|
{
|
||||||
pLine++; nCol++;
|
pLine++; nCol++;
|
||||||
if( *pLine != cSep || cSep == ']' ) break;
|
if( *pLine != cSep || cSep == ']' )
|
||||||
} else aError = OUString(cSep), GenError( SbERR_EXPECTED );
|
{
|
||||||
}
|
|
||||||
// If VBA Interop then doen't eat the [] chars
|
// If VBA Interop then doen't eat the [] chars
|
||||||
if ( cSep == ']' && bVBASupportOn )
|
if ( cSep == ']' && bVBASupportOn )
|
||||||
aSym = aLine.copy( n - 1, nCol - n + 1);
|
aSym = aLine.copy( n - 1, nCol - n + 1);
|
||||||
@ -510,6 +509,10 @@ bool SbiScanner::NextSym()
|
|||||||
aSym = aSymBuf.makeStringAndClear();
|
aSym = aSymBuf.makeStringAndClear();
|
||||||
if( cSep != ']' )
|
if( cSep != ']' )
|
||||||
eScanType = ( cSep == '#' ) ? SbxDATE : SbxSTRING;
|
eScanType = ( cSep == '#' ) ? SbxDATE : SbxSTRING;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else aError = OUString(cSep), GenError( SbERR_EXPECTED );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// invalid characters:
|
// invalid characters:
|
||||||
else if( ( *pLine & 0xFF ) >= 0x7F )
|
else if( ( *pLine & 0xFF ) >= 0x7F )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user