Menu

#9 Possible divide by zero in GUI Test Runner

v1.0 (example)
open
nobody
None
7
2014-08-12
2014-08-12
Nick Ring
No

Possible divide by zero in TGUITestRunner.UpdateStatus, on line https://sourceforge.net/p/dunit2/code/HEAD/tree/trunk/src/GUITestRunner.pas#l1171

LbProgress.Caption := IntToStr((100 * ScoreBar.Position) div ScoreBar.Max) + '%';

It is possible that ScoreBar.Max to be zero, so a check should be made before hand.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB