]> git.proxmox.com Git - qemu.git/blobdiff - readline.c
target-arm: When setting FPSCR.QC, don't clear other FPSCR bits
[qemu.git] / readline.c
index 6a3160aba53058f072d780f7bdbc241cff417361..a6c0039ad2c23bae5817f7ac37f1b1b73487800f 100644 (file)
@@ -236,7 +236,7 @@ static void readline_hist_add(ReadLineState *rs, const char *cmdline)
            new_entry = hist_entry;
            /* Put this entry at the end of history */
            memmove(&rs->history[idx], &rs->history[idx + 1],
-                   (READLINE_MAX_CMDS - idx + 1) * sizeof(char *));
+                   (READLINE_MAX_CMDS - (idx + 1)) * sizeof(char *));
            rs->history[READLINE_MAX_CMDS - 1] = NULL;
            for (; idx < READLINE_MAX_CMDS; idx++) {
                if (rs->history[idx] == NULL)