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:
committed by
Ilmari Lauhakangas
parent
05cfd9f973
commit
7f2472b873
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user