diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-04-06 21:34:04 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-04-06 21:34:04 +0200 |
commit | 5a4e160ce423f56456227c3d7d8d8a069120b377 (patch) | |
tree | fa2571bd998c3167055fb7cbc895b134523e8db9 /src/regexp_nfa.c | |
parent | 7bcdb7d1669b0a37cd86446dab0c66f2e1971fa7 (diff) | |
download | vim-git-5a4e160ce423f56456227c3d7d8d8a069120b377.tar.gz |
updated for version 7.4.253v7.4.253
Problem: Crash when using cpp syntax file with pattern using external
match. (Havard Garnes)
Solution: Discard match when end column is before start column.
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r-- | src/regexp_nfa.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index afcbed474..79b7612bd 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -6781,8 +6781,10 @@ nfa_regtry(prog, col) { struct multipos *mpos = &subs.synt.list.multi[i]; - /* Only accept single line matches. */ - if (mpos->start.lnum >= 0 && mpos->start.lnum == mpos->end.lnum) + /* Only accept single line matches that are valid. */ + if (mpos->start.lnum >= 0 + && mpos->start.lnum == mpos->end.lnum + && mpos->end.col >= mpos->start.col) re_extmatch_out->matches[i] = vim_strnsave(reg_getline(mpos->start.lnum) + mpos->start.col, |