]> git.proxmox.com Git - qemu.git/blobdiff - readline.c
qxl: Don't drop client capability bits
[qemu.git] / readline.c
index 5fc9643c2bf23a22822594e92ae5c19e7faef6df..a0c9638e4d9634453964f9f3fcd581842f6685a9 100644 (file)
@@ -248,8 +248,8 @@ static void readline_hist_add(ReadLineState *rs, const char *cmdline)
     if (idx == READLINE_MAX_CMDS) {
        /* Need to get one free slot */
        free(rs->history[0]);
-       memcpy(rs->history, &rs->history[1],
-              (READLINE_MAX_CMDS - 1) * sizeof(char *));
+       memmove(rs->history, &rs->history[1],
+               (READLINE_MAX_CMDS - 1) * sizeof(char *));
        rs->history[READLINE_MAX_CMDS - 1] = NULL;
        idx = READLINE_MAX_CMDS - 1;
     }