basic/source/runtime/methods.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 21ffeffaf67cfd0a31f9dfe8050570ea64719146 Author: Jesus Solis <[email protected]> AuthorDate: Tue Oct 14 20:07:27 2025 -0500 Commit: Mike Kaganski <[email protected]> CommitDate: Wed Oct 15 08:18:28 2025 +0200 tdf#154285 check for too many arguments in BASIC cos function Change-Id: I3d4e1b059e5a8d4223b476df1805ed38d2e653be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192420 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 6ba7c9acf03e..3505ec044f36 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -265,7 +265,7 @@ void SbRtl_Sin(StarBASIC *, SbxArray & rPar, bool) void SbRtl_Cos(StarBASIC *, SbxArray & rPar, bool) { - if (rPar.Count() < 2) + if (rPar.Count() != 2) return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); SbxVariableRef pArg = rPar.Get(1);
