FIX: ELayoutException: Position range overflow (issue #736)

This commit is contained in:
Alexander Koblov 2023-10-08 17:25:46 +03:00
commit c968b0de67

View file

@ -4046,6 +4046,13 @@ end;
procedure TfrmMain.WMSize(var message: TLMSize);
begin
// https://github.com/doublecmd/doublecmd/issues/736
if (Message.Width > High(Int16)) or (Message.Height > High(Int16)) then
begin
DCDebug('TfrmMain.WMSize invalid size %u x %u', [Message.Width, Message.Height]);
Exit;
end;
inherited WMSize(Message);
if not (csDestroying in ComponentState) then