basic/source/runtime/methods.cxx |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

New commits:
commit c4c017d1b8fe30d1ef452782eef71371282deb37
Author:     Aron Budea <aron.bu...@collabora.com>
AuthorDate: Sat Jul 29 02:16:58 2023 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Fri Oct 13 17:04:16 2023 +0200

    tdf#147132  tdf#154285 Flatten and check param count of IsMissing fn
    
    Change-Id: I17d79dcedf2b2e1cd45ef2eb82ff5e89a9bb2b46
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155028
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 2e84e964d0be..ad3b638805a2 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2433,15 +2433,11 @@ void SbRtl_IsNumeric(StarBASIC *, SbxArray & rPar, bool)
 
 void SbRtl_IsMissing(StarBASIC *, SbxArray & rPar, bool)
 {
-    if (rPar.Count() < 2)
-    {
-        StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
-    }
-    else
-    {
-        // #57915 Missing is reported by an error
-        rPar.Get(0)->PutBool(rPar.Get(1)->IsErr());
-    }
+    if (rPar.Count() != 2)
+        return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
+
+    // #57915 Missing is reported by an error
+    rPar.Get(0)->PutBool(rPar.Get(1)->IsErr());
 }
 
 // Function looks for wildcards, removes them and always returns the pure path

Reply via email to