Skip to content
Permalink
Browse files

Catch more sorts of exceptions in TMainForm.AnyGridGetText when conve…

…rting large integers to unix timestamps. Should fix #735
  • Loading branch information...
ansgarbecker committed Aug 13, 2019
1 parent d07d463 commit ea4fd3a2baa587b62063e3b234921127be172b61
Showing with 2 additions and 2 deletions.
  1. +2 −2 source/main.pas
@@ -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));

0 comments on commit ea4fd3a

Please sign in to comment.
You can’t perform that action at this time.