Kaydet (Commit) dc7ca91a authored tarafından Luboš Luňák's avatar Luboš Luňák

avoid calling OUString::copy() with length being -1

Which asserts in dbgutil build.

Change-Id: I0f8205ae98c5a57c430b7d8a574e4c0019855841
üst a5824fa9
......@@ -491,9 +491,8 @@ bool SbiScanner::NextSym()
if( *pLine == cSep )
{
pLine++; nCol++;
if( *pLine != cSep || cSep == ']' ) break;
} else aError = OUString(cSep), GenError( SbERR_EXPECTED );
}
if( *pLine != cSep || cSep == ']' )
{
// If VBA Interop then doen't eat the [] chars
if ( cSep == ']' && bVBASupportOn )
aSym = aLine.copy( n - 1, nCol - n + 1);
......@@ -510,6 +509,10 @@ bool SbiScanner::NextSym()
aSym = aSymBuf.makeStringAndClear();
if( cSep != ']' )
eScanType = ( cSep == '#' ) ? SbxDATE : SbxSTRING;
break;
}
} else aError = OUString(cSep), GenError( SbERR_EXPECTED );
}
}
// invalid characters:
else if( ( *pLine & 0xFF ) >= 0x7F )
......
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