summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/expand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expand.c b/src/expand.c
index e57efa6..4a5d75a 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -525,7 +525,7 @@ read:
 
 	/* Eat all trailing newlines */
 	dest = expdest;
-	for (; dest > (char *)stackblock() && dest[-1] == '\n';)
+	for (; dest > ((char *)stackblock() + startloc) && dest[-1] == '\n';)
 		STUNPUTC(dest);
 	expdest = dest;