kooloveme / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
0 stars 0 forks source link

Divide by zero #297

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Version   11.4
unit HTMLSubs;
    function DrawLogic(Canvas: TCanvas; X, Y, XRef, YRef, AWidth, AHeight, BlHt: Integer; IMgr: TIndentManager;
      var MaxWidth, Curs: Integer): Integer; override;
    procedure FindRowHeights(Canvas: TCanvas; AHeight: Integer);
F := AHeight / TotalDesHt;
Line 10445

I received a newsfeed via email and I get a division by zero error. I've 
implemented a quick fix

   if TotalDesHt>0 then F := AHeight / TotalDesHt else F:=1;

Hopefully you'll understand the program flow better than I can.

Original issue reported on code.google.com by Tirund...@gmail.com on 21 Aug 2013 at 9:19

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for spotting this issue.

Good luck! I did understand that code ;) and now ...

r433 fixes this issue.

Original comment by OrphanCat on 2 Sep 2013 at 6:09