aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/buffer2array.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer2array.c b/src/buffer2array.c
index 322036df0..39fc29bc9 100644
--- a/src/buffer2array.c
+++ b/src/buffer2array.c
@@ -41,7 +41,8 @@ int cstrtok(char *buffer, char *array[], const int max)
*(c++) = '\0';
break;
}
- }
+ } else if (*c == '\\' && escape)
+ memmove(c - 1, c, strlen(c) + 1);
escape = (*(c++) != '\\') ? 0 : !escape;
}
} else {