right. :) On Nov 9, 9:49 pm, James Vega <[email protected]> wrote: > On Mon, Nov 08, 2010 at 08:08:17PM -0800, mattn wrote: > > vim crash when $PATH is empty. > > below is a patch. check please. > > > - Yasuhiro Matsumoto > > > diff -r 1ccc1ace9e5b src/ex_getln.c > > --- a/src/ex_getln.c Wed Nov 03 22:32:24 2010 +0100 > > +++ b/src/ex_getln.c Tue Nov 09 13:02:54 2010 +0900 > > @@ -4746,8 +4746,10 @@ > > else if ((pat[0] == '.' && (vim_ispathsep(pat[1]) > > || (pat[1] == '.' && vim_ispathsep(pat[2]))))) > > path = (char_u *)"."; > > - else > > - path = vim_getenv((char_u *)"PATH", &mustfree); > > + else { > > + if ((path = vim_getenv((char_u *)"PATH", &mustfree))) > > + path = ""; > > + } > > This unilateraly replaces the value of $PATH, when it has one, with "". > Instead of this change (which should have included an == NULL check), > why not add a != NULL check in the following for loop? Attached patch > includes that update. > > -- > James > GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]> > > nullpath.diff > < 1KViewDownload > > signature.asc > < 1KViewDownload
-- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
