fpspreadsheet: Fix 32-bit overflow in fpsutils.Round().

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7174 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-11-03 11:05:08 +00:00
parent fbcd001982
commit 91e4b55009

View File

@ -153,7 +153,7 @@ function TryStrToFloatAuto(AText: String; out ANumber: Double;
function TryFractionStrToFloat(AText: String; out ANumber: Double;
out AIsMixed: Boolean; out AMaxDigits: Integer): Boolean;
function Round(AValue: Double): Integer;
function Round(AValue: Double): Int64;
function cmToPts(AValue: Double): Double; inline;
function EMUToIn(AValue: Int64): Double; inline;
@ -1854,7 +1854,7 @@ end;
{@@ ----------------------------------------------------------------------------
Special rounding function which avoids banker's rounding
-------------------------------------------------------------------------------}
function Round(AValue: Double): Integer;
function Round(AValue: Double): Int64;
begin
if AValue > 0 then
Result := trunc(AValue + 0.5)