Skip to content

Commit

Permalink
Skip leading whitespace when processing dollar commands
Browse files Browse the repository at this point in the history
  • Loading branch information
dymk committed Sep 27, 2024
1 parent 561006c commit 6c44e21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions FluidNC/src/ProcessSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,10 @@ Error execute_line(char* line, Channel& channel, AuthenticationLevel auth_level)
if (line[0] == 0) {
return Error::Ok;
}
// Skip leading whitespace
while (isspace(*line)) {
++line;
}
// User '$' or WebUI '[ESPxxx]' command
if (line[0] == '$' || line[0] == '[') {
if (gc_state.skip_blocks) {
Expand Down
4 changes: 4 additions & 0 deletions fixture_tests/fixtures/dollar_command_leading_whitespace.nc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-> $X
<- ok
-> $X
<- ok

0 comments on commit 6c44e21

Please sign in to comment.