basic/source/runtime/methods.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit aa886d1e3e56de93df2dcce92fe0d0b98c6ba117
Author:     Simon Chenery <[email protected]>
AuthorDate: Wed Nov 19 21:35:24 2025 +0100
Commit:     Mike Kaganski <[email protected]>
CommitDate: Thu Nov 20 06:12:31 2025 +0100

    tdf#154285 Check too many arguments to BASIC ATN function
    
    Change-Id: I521b62358ad810f778c96c90c48ff8a9fe2a3ae6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194224
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 45061c1ba6b0..f3a11c283c4e 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -275,7 +275,7 @@ void SbRtl_Cos(StarBASIC *, SbxArray & rPar, bool)
 
 void SbRtl_Atn(StarBASIC *, SbxArray & rPar, bool)
 {
-    if (rPar.Count() < 2)
+    if (rPar.Count() != 2)
         return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
 
     SbxVariableRef pArg = rPar.Get(1);

Reply via email to