Fixed compiler warning on Alpine using musl libc.
This commit is contained in:
parent
ee1a1cc9dc
commit
8feaa4b18d
1 changed files with 2 additions and 1 deletions
3
irc9.c
3
irc9.c
|
|
@ -1364,7 +1364,8 @@ static void history_add(const char *s)
|
|||
{
|
||||
if (!*s) return;
|
||||
if (hist_n == MAXHIST) {
|
||||
memmove(history[0], history[1], (MAXHIST - 1) * MAXINPUT);
|
||||
for (int i = 1; i < MAXHIST; i++)
|
||||
memcpy(history[i - 1], history[i], sizeof history[i]);
|
||||
hist_n--;
|
||||
}
|
||||
snprintf(history[hist_n++], MAXINPUT, "%s", s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue