sc/source/core/opencl/op_math.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit b6dbe0abef3e73f0f5c06073ccb8338831bf0522 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: Thu Dec 6 15:35:55 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> (cherry picked from commit 581c7e4a0ec50aaa13112985c7e79cd66628f997) Reviewed-on: https://gerrit.libreoffice.org/64612 diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx index ec4a75daa9eb..41e6a5818166 100644 --- a/sc/source/core/opencl/op_math.cxx +++ b/sc/source/core/opencl/op_math.cxx @@ -1277,6 +1277,10 @@ void OpSqrt::GenSlidingWindowFunction(std::stringstream &ss, ss << " arg0="; ss << tmpCur->GetDouble() << ";\n"; } + else + { + throw Unhandled( __FILE__, __LINE__ ); + } } else { @@ -1284,6 +1288,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