Fix is_M29

Followup for #13013
This commit is contained in:
Scott Lahteine 2019-04-15 23:46:36 -05:00
parent 5f49b65c1f
commit 92ed9a2bb6

View file

@ -526,8 +526,9 @@ void gcode_line_error(PGM_P const err, const int8_t port) {
#endif // BINARY_FILE_TRANSFER #endif // BINARY_FILE_TRANSFER
FORCE_INLINE bool is_M29(const char * const cmd) { FORCE_INLINE bool is_M29(const char * const cmd) { // matches "M29" & "M29 ", but not "M290", etc
return cmd[0] == 'M' && cmd[1] == '2' && cmd[2] == '9' && !WITHIN(cmd[3], '0', '9'); const char * const m29 = strstr_P(cmd, PSTR("M29"));
return m29 && !NUMERIC(m29[3]);
} }
/** /**