aboutsummaryrefslogtreecommitdiff
path: root/jim.c
diff options
context:
space:
mode:
Diffstat (limited to 'jim.c')
-rw-r--r--jim.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/jim.c b/jim.c
index 17f41f0..4853f0f 100644
--- a/jim.c
+++ b/jim.c
@@ -1714,8 +1714,13 @@ int JimParseListStr(struct JimParserCtx *pc)
}
switch (*pc->p) {
case '\\':
+ if (--pc->len == 0) {
+ /* Trailing newline */
+ pc->tt = JIM_TT_ESC;
+ pc->tend = pc->p;
+ return JIM_OK;
+ }
pc->p++;
- pc->len--;
break;
case ' ':
case '\t':