Skip to content

Commit 1e706e5

Browse files
authored
Merge pull request #2153 from adamlouis/2.8-fix-get-program
fix: linuxcncrsh: return PROGRAM NONE if no program is open (2.8)
2 parents 11e849e + b09cd0b commit 1e706e5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/emc/usr_intf/emcrsh.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,11 +2041,11 @@ static cmdResponseType getJointHomed(char *s, connectionRecType *context)
20412041
static cmdResponseType getProgram(char *s, connectionRecType *context)
20422042
{
20432043
const char *pProgram = "PROGRAM %s";
2044-
2045-
// snprintf(outBuf, sizeof(outBuf), pProgram, progName);
2046-
// printf("Program name = %s", emcStatus->task.file[0]);
2044+
20472045
if (emcStatus->task.file[0] != 0)
20482046
snprintf(context->outBuf, sizeof(context->outBuf), pProgram, emcStatus->task.file);
2047+
else
2048+
snprintf(context->outBuf, sizeof(context->outBuf), pProgram, "NONE");
20492049
return rtNoError;
20502050
}
20512051

0 commit comments

Comments
 (0)