forked from aniani/vim
patch 8.2.4968: reading past end of the line when C-indenting
Problem: Reading past end of the line when C-indenting. Solution: Check for NUL.
This commit is contained in:
@@ -89,7 +89,7 @@ skip_string(char_u *p)
|
||||
while (vim_isdigit(p[i - 1])) // '\000'
|
||||
++i;
|
||||
}
|
||||
if (p[i] == '\'') // check for trailing '
|
||||
if (p[i - 1] != NUL && p[i] == '\'') // check for trailing '
|
||||
{
|
||||
p += i;
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user