Commit 6c1844f6c7853b50d214090d982e46b676e1e53e

Stefan Sperling 2019-07-25T14:46:27

fix histedit syntax error detection

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/got/got.c b/got/got.c
index f267e72..3ff7966 100644
--- a/got/got.c
+++ b/got/got.c
@@ -4293,7 +4293,7 @@ histedit_parse_list(struct got_histedit_list *histedit_cmds,
 				break;
 			}
 		}
-		if (cmd == NULL) {
+		if (i == nitems(got_histedit_cmds)) {
 			err = histedit_syntax_error(lineno);
 			break;
 		}