about summary refs log tree commit diff
path: root/atxec.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2019-11-20 22:24:04 +0100
committerLeah Neukirchen <leah@vuxu.org>2019-11-20 22:24:04 +0100
commite482f75e7d11ca64a67efe5c8bb757ff983ac4af (patch)
treeda04ddcc2044341eba22bd4581fb7af4ba9da1dd /atxec.c
parentc602bfd08a47f4840bf2e8d96663f76e2fb22f1c (diff)
downloadatxec-e482f75e7d11ca64a67efe5c8bb757ff983ac4af.tar.gz
atxec-e482f75e7d11ca64a67efe5c8bb757ff983ac4af.tar.xz
atxec-e482f75e7d11ca64a67efe5c8bb757ff983ac4af.zip
fix comment parsing when there is no final newline
Found by @duncaen.
Diffstat (limited to 'atxec.c')
-rwxr-xr-xatxec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/atxec.c b/atxec.c
index 9432c56..f1bdf7e 100755
--- a/atxec.c
+++ b/atxec.c
@@ -49,7 +49,7 @@ arg_splice(char *s)
 	while (1) {
 		while (isspace(*s) || *s == '#')
 			if (*s == '#')  /* skip line comment */
-				while (*s != '\n')
+				while (*s && *s != '\n')
 					s++;
 			else
 				s++;