Skip to content
Snippets Groups Projects
Commit e7cac07b authored by marwan's avatar marwan
Browse files

resolved bug: crash if waitbar was called with '0'

parent 88334cca
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,12 @@ switch type
lastUpdate = get(f,'UserData');
dx = x;
dt = etime(clock,lastUpdate.time);
secRemain = dt/dx * (100 - x);
if dx > 0
secRemain = dt/dx * (100 - x);
else
secRemain = 0;
end
timeRemain = [];
if (secRemain > lastUpdate.showTime | lastUpdate.flag) & lastUpdate.showTime >= 0
tx = datestr(datenum(0, 0, 0, 0, 0, secRemain),13);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment