aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/alfsum.12
-rw-r--r--src/crunch.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/alfsum.1 b/src/alfsum.1
index 086f2d5..8994393 100644
--- a/src/alfsum.1
+++ b/src/alfsum.1
@@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
-.TH "ALFSUM" 1 "2025-11-29" "0.2.1" "Urchlay's Atari 8-bit Tools"
+.TH "ALFSUM" 1 "2025-12-01" "0.2.1" "Urchlay's Atari 8-bit Tools"
.SH NAME
alfsum \- calculate ALF checksums
.\" RST source for alfsum(1) man page. Convert with:
diff --git a/src/crunch.c b/src/crunch.c
index 2bef18d..880f059 100644
--- a/src/crunch.c
+++ b/src/crunch.c
@@ -98,6 +98,9 @@ token_t *match_token(int pos) {
t = &root_tokens[input_buf[pos]];
new_pos = pos + 1;
+ if(new_pos == input_len)
+ return t;
+
p = t;
while((p = get_kid(t, input_buf[new_pos]))) {
t = p;