patch 8.2.3482: reading beyond end of line ending in quote and backslash
Problem: Reading beyond end of line ending in quote and backslash.
Solution: Check for non-NUL after backslash. (closes #8964)
diff --git a/src/cindent.c b/src/cindent.c
index b751206..850a369 100644
--- a/src/cindent.c
+++ b/src/cindent.c
@@ -82,10 +82,10 @@
{
if (p[0] == '\'') // 'c' or '\n' or '\000'
{
- if (!p[1]) // ' at end of line
+ if (p[1] == NUL) // ' at end of line
break;
i = 2;
- if (p[1] == '\\') // '\n' or '\000'
+ if (p[1] == '\\' && p[2] != NUL) // '\n' or '\000'
{
++i;
while (vim_isdigit(p[i - 1])) // '\000'