aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/template.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/template.c b/src/template.c
index cf021c1..6949068 100644
--- a/src/template.c
+++ b/src/template.c
@@ -425,11 +425,15 @@ struct unja_object *eval_infix_expression(struct unja_object *left, char *op, st
case '!':
if (op[1] == '=') {
result = object_to_int(left) != object_to_int(right);
+ } else {
+ errx(EXIT_FAILURE, "invalid int operator: %s", op);
}
break;
case '=':
if (op[1] == '=') {
result = object_to_int(left) == object_to_int(right);
+ } else {
+ errx(EXIT_FAILURE, "invalid int operator: %s", op);
}
break;
}