Skip to content

Commit 0d3c90d

Browse files
authored
Merge pull request #338 from IVOES/cpp/non-constant-format
Fix non-constant format string
2 parents 5673ca2 + d6580f4 commit 0d3c90d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PikaObj.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,7 +1739,7 @@ enum shellCTRL _inner_do_obj_runChar(PikaObj* self,
17391739
shell->lineBuff[shell->line_position] = 0;
17401740
if (shell->line_curpos != shell->line_position) {
17411741
/* update screen */
1742-
pika_platform_printf(shell->lineBuff + shell->line_curpos);
1742+
pika_platform_printf("%s", shell->lineBuff + shell->line_curpos);
17431743
pika_platform_printf(" ");
17441744
_putc_cmd(PIKA_KEY_LEFT,
17451745
shell->line_position - shell->line_curpos + 1);
@@ -1762,7 +1762,7 @@ enum shellCTRL _inner_do_obj_runChar(PikaObj* self,
17621762
shell->line_position - shell->line_curpos);
17631763
shell->lineBuff[shell->line_position + 1] = 0;
17641764
if (shell->line_curpos != shell->line_position) {
1765-
pika_platform_printf(shell->lineBuff + shell->line_curpos + 1);
1765+
pika_platform_printf("%s", shell->lineBuff + shell->line_curpos + 1);
17661766
_putc_cmd(PIKA_KEY_LEFT,
17671767
shell->line_position - shell->line_curpos);
17681768
}

0 commit comments

Comments
 (0)