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:
@ -466,7 +466,12 @@ end;
|
|||||||
function MakeInt(Str: String): Int64;
|
function MakeInt(Str: String): Int64;
|
||||||
begin
|
begin
|
||||||
// Result has to be of integer type
|
// Result has to be of integer type
|
||||||
|
try
|
||||||
Result := Trunc(MakeFloat(Str));
|
Result := Trunc(MakeFloat(Str));
|
||||||
|
except
|
||||||
|
on E:EInvalidOp do
|
||||||
|
Result := 0;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user