mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-10-26 07:46:11 +01:00
gcode: Improve checksum detection in get_raw_command_parameters()
Only consider a trailing '*' to indicate a checksum if the remainder of the string is a number. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -35,7 +35,7 @@ class GCodeCommand:
|
||||
# Skip any gcode line-number and ignore any trailing checksum
|
||||
param_start += origline.upper().find(command)
|
||||
end = origline.rfind('*')
|
||||
if end >= 0:
|
||||
if end >= 0 and origline[end+1:].isdigit():
|
||||
param_end = end
|
||||
if origline[param_start:param_start+1].isspace():
|
||||
param_start += 1
|
||||
|
||||
Reference in New Issue
Block a user