Kaydet (Commit) 375a6c7a authored tarafından Thomas Arnhold's avatar Thomas Arnhold

i#64348 basic: fix CDec() crash if string is empty

This time without memory leak.

Change-Id: If4474004124b7497b8451030a13db36887ead737
üst 3beaccc0
......@@ -194,6 +194,8 @@ void SbxDecimal::setUInt( unsigned int val )
bool SbxDecimal::setString( OUString* pOUString )
{
assert(pOUString);
static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US );
// Convert delimiter
......@@ -471,7 +473,9 @@ start:
case SbxLPSTR:
case SbxSTRING:
case SbxBYREF | SbxSTRING:
pnDecRes->setString( p->pOUString ); break;
if ( p->pOUString )
pnDecRes->setString( p->pOUString );
break;
case SbxOBJECT:
{
SbxValue* pVal = PTR_CAST(SbxValue,p->pObj);
......
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