]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-020 v7.1.020
authorBram Moolenaar <Bram@vim.org>
Thu, 5 Jul 2007 08:11:42 +0000 (08:11 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 5 Jul 2007 08:11:42 +0000 (08:11 +0000)
src/message.c
src/version.c

index 8bb27cddc49a227cdce8adf18740a564b68f98b5..9c574916353bbac032d3093be2a6b1357a1b6342 100644 (file)
@@ -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. */
index 0590d3162c47a5d18b0953de0376f95a59c20705..b72c713cd70b4dbb68306472229a481c37e6404a 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    20,
 /**/
     19,
 /**/