> How about this change instead:
>
> *** ../vim-7.1.094/src/message.c        Tue Aug  7 21:59:26 2007
> --- src/message.c       Thu Aug 30 21:05:17 2007
> ***************
> *** 1941,1946 ****
> --- 1942,1951 ----
>                 if (quit_more)
>                     return;
>             }
> +
> +           /* Quit when at the end of the text, avoid reading past it. */
> +           if (maxlen >= 0 && (int)(s - str) >= maxlen)
> +               break;
>


Indeed, I overlooked the fact that maxlen could be negative.

Shouldn't the test be:

   /* Quit when at the end of the text, avoid reading past it. */
   if ((maxlen >= 0 && (int)(s - str) >= maxlen) || *s == NUL)
       break;

Which is the negation of the test in the while loop at line 1845.

-- Dominique

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui