From 06d19b472ae9919072fdad8a2b6279820fbc4c3c Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Sun, 7 Aug 2022 00:35:02 +0200 Subject: [PATCH] G28: check for X/Y/Z parameters before calling code_value_long Fixes #3555, thanks to @toombaumarkt --- Firmware/Marlin_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index e2069d20..7585ed70 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -4806,11 +4806,11 @@ eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,0xFFFF); long home_z_value = 0; // Which axes should be homed? bool home_x = code_seen(axis_codes[X_AXIS]); - home_x_value = code_value_long(); + if (home_x) home_x_value = code_value_long(); bool home_y = code_seen(axis_codes[Y_AXIS]); - home_y_value = code_value_long(); + if (home_y) home_y_value = code_value_long(); bool home_z = code_seen(axis_codes[Z_AXIS]); - home_z_value = code_value_long(); + if (home_z) home_z_value = code_value_long(); bool without_mbl = code_seen('W'); // calibrate? #ifdef TMC2130