diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-10-30 16:37:15 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-10-30 16:37:15 +0000 |
commit | 9642664800ccbebe6a250fb1ddf5862c9bdbe869 (patch) | |
tree | a42059ffc8bfa94ee70f6979393cb296f4720561 /src/ex_getln.c | |
parent | b52e260d2317524cd727ddc459ae4ef196906208 (diff) | |
download | vim-git-9642664800ccbebe6a250fb1ddf5862c9bdbe869.tar.gz |
updated for version 7.1-147v7.1.147
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 7ce48a891..68966def0 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -3353,6 +3353,7 @@ ExpandOne(xp, str, orig, options, mode) char_u *ss = NULL; static int findex; static char_u *orig_save = NULL; /* kept value of orig */ + int orig_saved = FALSE; int i; long_u len; int non_suf_match; /* number without matching suffix */ @@ -3421,6 +3422,7 @@ ExpandOne(xp, str, orig, options, mode) { vim_free(orig_save); orig_save = orig; + orig_saved = TRUE; /* * Do the expansion. @@ -3546,7 +3548,7 @@ ExpandOne(xp, str, orig, options, mode) ExpandCleanup(xp); /* Free "orig" if it wasn't stored in "orig_save". */ - if (orig != orig_save) + if (!orig_saved) vim_free(orig); return ss; |