Skip to content

Commit

Permalink
snprintf uses %d on a double (issue 2784)
Browse files Browse the repository at this point in the history
  • Loading branch information
smoe authored and andypugh committed Dec 14, 2023
1 parent 6ded497 commit 86ce4bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emc/usr_intf/emcrsh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ static cmdResponseType getTool(char *s, connectionRecType *context)

static cmdResponseType getToolOffset(char *s, connectionRecType *context)
{
const char *pToolOffsetStr = "TOOL_OFFSET %d";
const char *pToolOffsetStr = "TOOL_OFFSET %f";

snprintf(context->outBuf, sizeof(context->outBuf), pToolOffsetStr, emcStatus->task.toolOffset.tran.z);
return rtNoError;
Expand Down

0 comments on commit 86ce4bb

Please sign in to comment.