summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2023-07-29 02:16:58 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2023-10-13 17:04:16 +0200
commitc4c017d1b8fe30d1ef452782eef71371282deb37 (patch)
treec759cce7e7e960b1b2749ee0fed117af42642840 /basic
parent27e7a6199231b8b9942724c86d0a22126e71862e (diff)
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.kaganski@collabora.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/methods.cxx14
1 files changed, 5 insertions, 9 deletions
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