From 8feaa4b18db279424e3a9e72a41d1c8ab508b2e3 Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Fri, 27 Nov 2026 01:22:58 +0100 Subject: [PATCH] Fixed compiler warning on Alpine using musl libc. --- irc9.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/irc9.c b/irc9.c index 4d18914..7a8e857 100644 --- a/irc9.c +++ b/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);