sc/source/core/opencl/op_math.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 581c7e4a0ec50aaa13112985c7e79cd66628f997 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Tue Dec 4 12:58:11 2018 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Wed Dec 5 11:02:24 2018 +0100 OpenCL SQRT() error checking Change-Id: I6208cf21f53d1a2a0eb4f08962c7bddcc372aab5 Reviewed-on: https://gerrit.libreoffice.org/64545 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx index 224c6480c3b5..4b34df551426 100644 --- a/sc/source/core/opencl/op_math.cxx +++ b/sc/source/core/opencl/op_math.cxx @@ -1278,6 +1278,10 @@ void OpSqrt::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0="; ss << tmpCur->GetDouble() << ";\n"; } + else + { + throw Unhandled( __FILE__, __LINE__ ); + } } else { @@ -1285,6 +1289,8 @@ void OpSqrt::GenSlidingWindowFunction(std::stringstream &ss, ss << vSubArguments[0]->GenSlidingWindowDeclRef(); ss << ";\n"; } + ss << " if( arg0 < 0 )\n"; + ss << " return CreateDoubleError(IllegalArgument);\n"; ss << " return sqrt(arg0);\n"; ss << "}"; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits