From 592470f29699b5db759aebde688c84f4cd40869d Mon Sep 17 00:00:00 2001 From: techninja Date: Sun, 30 Nov 2014 14:05:11 -0800 Subject: [PATCH] Ensure that the max value is never zero in a bindable state This can lead to Div/0! Fixes #184 --- resources/scripts/robopaint.mode.svg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/scripts/robopaint.mode.svg.js b/resources/scripts/robopaint.mode.svg.js index fd081e1..6ca48b6 100644 --- a/resources/scripts/robopaint.mode.svg.js +++ b/resources/scripts/robopaint.mode.svg.js @@ -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({