1
0
forked from aniani/vim

patch 8.2.4009: reading one byte beyond the end of the line

Problem:    Reading one byte beyond the end of the line.
Solution:   Check for NUL byte first.
This commit is contained in:
Bram Moolenaar
2022-01-05 16:50:40 +00:00
parent 677658ae49
commit d3a117814d
4 changed files with 17 additions and 2 deletions

View File

@@ -3537,6 +3537,17 @@ def Test_numbered_function_reference()
unlet g:mydict
enddef
def Test_go_beyond_end_of_cmd()
# this was reading the byte after the end of the line
var lines =<< trim END
def F()
cal
enddef
defcompile
END
CheckScriptFailure(lines, 'E476:')
enddef
if has('python3')
def Test_python3_heredoc()
py3 << trim EOF