From 2e0da8abdc22c005fc81dfc4e10411600aee0749 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 8 Jul 2015 17:30:39 -0700 Subject: [PATCH] Allow N to take a negative argument (PR@2402) --- Marlin/Marlin_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 0bfba2c83..3afaf1b2e 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5307,8 +5307,8 @@ void process_next_command() { // - Bypass N[0-9][0-9]*[ ]* // - Overwrite * with nul to mark the end while (*current_command == ' ') ++current_command; - if (*current_command == 'N' && current_command[1] >= '0' && current_command[1] <= '9') { - current_command += 2; // skip N[0-9] + if (*current_command == 'N' && ((current_command[1] >= '0' && current_command[1] <= '9') || current_command[1] == '-')) { + current_command += 2; // skip N[-0-9] while (*current_command >= '0' && *current_command <= '9') ++current_command; // skip [0-9]* while (*current_command == ' ') ++current_command; // skip [ ]* }