From fc5c1a28d854a430b2f553e6aedce2905e577b2a Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Tue, 23 Jan 2018 20:53:15 -0600
Subject: [PATCH] Fix M118 parameter parsing

---
 Marlin/src/gcode/host/M118.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Marlin/src/gcode/host/M118.cpp b/Marlin/src/gcode/host/M118.cpp
index 63e195ae63..aadf2d06c5 100644
--- a/Marlin/src/gcode/host/M118.cpp
+++ b/Marlin/src/gcode/host/M118.cpp
@@ -29,7 +29,7 @@
  *  E1  Have the host 'echo:' the text
  */
 void GcodeSuite::M118() {
-  if (parser.boolval('E')) SERIAL_ECHO_START();
-  if (parser.boolval('A')) SERIAL_ECHOPGM("// ");
+  if (parser.seenval('E') && parser.value_bool()) SERIAL_ECHO_START();
+  if (parser.seenval('A') && parser.value_bool()) SERIAL_ECHOPGM("// ");
   SERIAL_ECHOLN(parser.string_arg);
 }
-- 
GitLab