Skip to content

Commit

Permalink
Catch more sorts of exceptions in TMainForm.AnyGridGetText when conve…
Browse files Browse the repository at this point in the history
…rting large integers to unix timestamps. Should fix #735
  • Loading branch information
ansgarbecker committed Aug 13, 2019
1 parent d07d463 commit ea4fd3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/main.pas
Expand Up @@ -9045,8 +9045,8 @@ procedure TMainForm.AnyGridGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
try
Timestamp := Trunc(StrToFloat(Results.Col(Column), FFormatSettings));
except
on E:EConvertError do
Timestamp := 0;
// EConvertError in StrToFloat or EInvalidOp in Trunc or...
Timestamp := 0;
end;
Dec(Timestamp, FTimeZoneOffset);
CellText := DateTimeToStr(UnixToDateTime(Timestamp));
Expand Down

0 comments on commit ea4fd3a

Please sign in to comment.