fix histedit syntax error detection
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;
}