summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2020-12-05 09:41:56 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2020-12-07 16:10:09 +0100
commit2538188ee85513cb80eb8aa8f925082d86ff711d (patch)
tree8186d65716e8ae5554bcfd9601a764990c657b03 /basic
parent039a87fb1022fe4d6e66e1540e7fb49cb154f08a (diff)
tdf#43003 - convert parameter to the requested type
In StepPARAM convert parameters to the requested type, otherwise it loses possible references which leads to an error where the results of a macro has no effect on the caller. Change-Id: I8347eab658e037a29cd04be9c00edd6a4d1b31c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107249 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/runtime.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 6ac8168358be..5a64166b63a1 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -4177,14 +4177,8 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
}
else if( eType != SbxVARIANT && static_cast<SbxDataType>(pVar->GetType() & 0x0FFF ) != eType )
{
- SbxVariable* q = new SbxVariable( eType );
- aRefSaved.emplace_back(q );
- *q = *pVar;
- pVar = q;
- if ( nIdx )
- {
- refParams->Put32( pVar, nIdx );
- }
+ // tdf#43003 - convert parameter to the requested type
+ pVar->Convert(eType);
}
SetupArgs( pVar, nOp1 );
PushVar( CheckArray( pVar ) );