From 862c72b030da076909e048d36cc2d33b8b6ad4a6 Mon Sep 17 00:00:00 2001
From: Scott Lahteine <sourcetree@thinkyhead.com>
Date: Tue, 23 Jun 2015 17:57:38 -0700
Subject: [PATCH] Put the mandatory test of gcode_N first

---
 Marlin/Marlin_main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp
index 352a134b9c..69f65e737a 100644
--- a/Marlin/Marlin_main.cpp
+++ b/Marlin/Marlin_main.cpp
@@ -801,7 +801,7 @@ void get_command() {
 
         gcode_N = strtol(npos + 1, NULL, 10);
 
-        if (!M110 && gcode_N != gcode_LastN + 1) {
+        if (gcode_N != gcode_LastN + 1 && !M110) {
           gcode_line_error(PSTR(MSG_ERR_LINE_NO));
           return;
         }
-- 
GitLab