diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-07-05 08:11:42 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-07-05 08:11:42 +0000 |
commit | 6a5160696676716b22bfe1dde9f1b0c0b41dc49f (patch) | |
tree | 27bb7e8eacd2b735f6650110735d0870f532f8dd | |
parent | 3ebc1e511263eeb3fd398413ab199fa82d736837 (diff) | |
download | vim-git-6a5160696676716b22bfe1dde9f1b0c0b41dc49f.tar.gz |
updated for version 7.1-020v7.1.020
-rw-r--r-- | src/message.c | 13 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/message.c b/src/message.c index 8bb27cddc..9c5749163 100644 --- a/src/message.c +++ b/src/message.c @@ -3456,11 +3456,11 @@ msg_show_console_dialog(message, buttons, dfltbutton) /* advance to next hotkey and set default hotkey */ #ifdef FEAT_MBYTE if (has_mbyte) - hotkp += (*mb_ptr2len)(hotkp); + hotkp += STRLEN(hotkp); else #endif ++hotkp; - (void)copy_char(r + 1, hotkp, TRUE); + hotkp[copy_char(r + 1, hotkp, TRUE)] = NUL; if (dfltbutton) --dfltbutton; @@ -3493,7 +3493,7 @@ msg_show_console_dialog(message, buttons, dfltbutton) *msgp++ = (dfltbutton == 1) ? ']' : ')'; /* redefine hotkey */ - (void)copy_char(r, hotkp, TRUE); + hotkp[copy_char(r, hotkp, TRUE)] = NUL; } } else @@ -3519,8 +3519,6 @@ msg_show_console_dialog(message, buttons, dfltbutton) *msgp++ = ':'; *msgp++ = ' '; *msgp = NUL; - mb_ptr_adv(hotkp); - *hotkp = NUL; } else { @@ -3555,8 +3553,9 @@ msg_show_console_dialog(message, buttons, dfltbutton) msgp = confirm_msg + 1 + STRLEN(message); hotkp = hotk; - /* define first default hotkey */ - (void)copy_char(buttons, hotkp, TRUE); + /* Define first default hotkey. Keep the hotkey string NUL + * terminated to avoid reading past the end. */ + hotkp[copy_char(buttons, hotkp, TRUE)] = NUL; /* Remember where the choices start, displaying starts here when * "hotkp" typed at the more prompt. */ diff --git a/src/version.c b/src/version.c index 0590d3162..b72c713cd 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 20, +/**/ 19, /**/ 18, |