Skip to content

Commit

Permalink
Fix 'sprintf' argument (pointer vs reference to pointer)
Browse files Browse the repository at this point in the history
  • Loading branch information
icamaster committed Jan 9, 2024
1 parent 4d13fe4 commit 492be7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/embedded_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ static void moveCursor(EmbeddedCli* cli, uint16_t count, bool direction) {
// 5 = uint16_t max, 3 = escape sequence, 1 = string termination
char escBuffer[5 + 3 + 1] = { 0 };
char dirChar = direction ? escSeqCursorRight[5] : escSeqCursorLeft[5];
sprintf(&escBuffer, "\x1B[%u%c", count, dirChar);
sprintf(escBuffer, "\x1B[%u%c", count, dirChar);
writeToOutput(cli, escBuffer);
}

Expand Down

0 comments on commit 492be7c

Please sign in to comment.