mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Catch EInvalidOp exceptions from calls to Trunc(), caused by unsigned Int64 values in string parameters of MakeInt().
This commit is contained in:
@ -463,10 +463,15 @@ end;
|
||||
@param string String-number
|
||||
@return int64
|
||||
}
|
||||
function MakeInt( Str: String ) : Int64;
|
||||
function MakeInt(Str: String): Int64;
|
||||
begin
|
||||
// Result has to be of integer type
|
||||
Result := Trunc( MakeFloat( Str ) );
|
||||
try
|
||||
Result := Trunc(MakeFloat(Str));
|
||||
except
|
||||
on E:EInvalidOp do
|
||||
Result := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user