Skip to content

Commit

Permalink
Ensure that the max value is never zero in a bindable state
Browse files Browse the repository at this point in the history
This can lead to Div/0! Fixes #184
  • Loading branch information
techninja committed Nov 30, 2014
1 parent 1364f95 commit 592470f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/scripts/robopaint.mode.svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ $(function() {

// Empty buffer?
if (!cncserver.state.buffer.length) {
cncserver.state.process.max = 0;
cncserver.cmd.progress({val: 0, max: 0});
cncserver.state.process.max = 1;
cncserver.cmd.progress({val: 0, max: 1});
} else { // At least one item in buffer
// Update the progress bar
cncserver.cmd.progress({
Expand Down

0 comments on commit 592470f

Please sign in to comment.