From 718ace8f05a2db8d59b03ca30419825236c05214 Mon Sep 17 00:00:00 2001 From: Michael Moon Date: Sun, 6 Mar 2011 09:16:05 +1100 Subject: [PATCH] prevent arithmetic overflow for large max feedrates --- gcode_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcode_process.c b/gcode_process.c index 81f539a..272566e 100644 --- a/gcode_process.c +++ b/gcode_process.c @@ -124,7 +124,7 @@ void process_gcode_command() { // since it would be a major hassle to force the dda to not synchronise, just provide a fast feedrate and hope it's close enough to what host expects case 0: backup_f = next_target.target.F; - next_target.target.F = MAXIMUM_FEEDRATE_X * 2; + next_target.target.F = MAXIMUM_FEEDRATE_X * 2L; enqueue(&next_target.target); next_target.target.F = backup_f; break;