diff --git a/a1/program.c b/a1/program.c index 5531d3c..22ab81e 100644 --- a/a1/program.c +++ b/a1/program.c @@ -31,7 +31,7 @@ void check_brackets(const char *code) { if (top == -1) { printf("All brackets OK\n"); } else { - printf("Missing closing brackets: %c\n", stack[top]); + printf("Missing closing brackets: %c\n", stack[top -1]); } }