1
0
forked from aniani/vim

patch 8.2.4925: trailing backslash may cause reading past end of line

Problem:    Trailing backslash may cause reading past end of line.
Solution:   Check for NUL after backslash.
This commit is contained in:
Bram Moolenaar
2022-05-09 13:15:07 +01:00
parent 0519ce0039
commit 53a70289c2
3 changed files with 15 additions and 1 deletions

View File

@@ -185,10 +185,18 @@ func Test_string_html_objects()
call assert_equal("<div><div\nattr=\"attr\"\n></div></div>", @", e)
set quoteescape&
" this was going beyond the end of the line
%del
sil! norm i"\
sil! norm i"\
sil! norm i"\
call assert_equal('"\', getline(1))
bwipe!
endfor
set enc=utf-8
bwipe!
endfunc
func Test_empty_html_tag()