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

New commits:
commit 43458f83f29067752cfb3df2ccfe0eeb940f4b71
Author:     Roman Kuznetsov <antilibreoff...@gmail.com>
AuthorDate: Sun May 29 15:32:53 2022 +0200
Commit:     Roman Kuznetsov <antilibreoff...@gmail.com>
CommitDate: Mon May 30 08:45:42 2022 +0200

    tdf#147132 Flatten Basic function implementation
    
    Change-Id: Ife73d08e57bb1c896a27f8cbbd6b1f4b106587a1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135062
    Tested-by: Jenkins
    Reviewed-by: Roman Kuznetsov <antilibreoff...@gmail.com>

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 4dbe3f526626..122e87947ee0 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -721,14 +721,12 @@ void SbRtl_SendKeys(StarBASIC *, SbxArray & rPar, bool)
 void SbRtl_Exp(StarBASIC *, SbxArray & rPar, bool)
 {
     if (rPar.Count() < 2)
-        StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
-    else
-    {
-        double aDouble = rPar.Get(1)->GetDouble();
-        aDouble = exp( aDouble );
-        checkArithmeticOverflow( aDouble );
-        rPar.Get(0)->PutDouble(aDouble);
-    }
+        return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
+
+    double aDouble = rPar.Get(1)->GetDouble();
+    aDouble = exp( aDouble );
+    checkArithmeticOverflow( aDouble );
+    rPar.Get(0)->PutDouble(aDouble);
 }
 
 void SbRtl_FileLen(StarBASIC *, SbxArray & rPar, bool)

Reply via email to