tdf#154285 Check argument count in BASIC SGN function

Change-Id: Ic20ceed1d736ea2436bc4dd37cfd242efcec79b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206268
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:
Furkan Ahmet Kara
2026-07-04 07:17:42 +02:00
committed by Ilmari Lauhakangas
parent 05cfd9f973
commit 7f2472b873
+1 -1
View File
@@ -1273,7 +1273,7 @@ void SbRtl_RTrim(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Sgn(StarBASIC *, SbxArray & rPar, bool)
{
if (rPar.Count() < 2)
if (rPar.Count() != 2)
return StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
double aDouble = rPar.Get(1)->GetDouble();