diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2018-12-04 13:25:18 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2018-12-05 11:03:14 +0100 |
commit | 3156228b1d737ca47ff4e959a6e357581af3ec2e (patch) | |
tree | 94a279183beea2d355e4d8a53e188286e3793fb3 | |
parent | 581c7e4a0ec50aaa13112985c7e79cd66628f997 (diff) |
OpenCL FVSCHEDULE() error checking
Change-Id: If93a9ea6e0265ba616b4a1fbe138d310ea3e8693
Reviewed-on: https://gerrit.libreoffice.org/64546
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r-- | sc/source/core/opencl/op_financial.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/core/opencl/op_financial.cxx b/sc/source/core/opencl/op_financial.cxx index 6f728cbbbdd2..66d1f9d18e28 100644 --- a/sc/source/core/opencl/op_financial.cxx +++ b/sc/source/core/opencl/op_financial.cxx @@ -750,8 +750,11 @@ void OpMDuration::GenSlidingWindowFunction(std::stringstream& ss, void Fvschedule::GenSlidingWindowFunction( std::stringstream &ss, const std::string &sSymName, SubArguments &vSubArguments) { + CHECK_PARAMETER_COUNT( 2, 2 ); FormulaToken* pCur = vSubArguments[1]->GetFormulaToken(); assert(pCur); + if(vSubArguments[0]->GetFormulaToken()->GetType() != formula::svDoubleVectorRef) + throw Unhandled( __FILE__, __LINE__ ); const formula::DoubleVectorRefToken* pCurDVR = static_cast<const formula::DoubleVectorRefToken *>(pCur); size_t nCurWindowSize = pCurDVR->GetRefRowSize(); |