This commit is contained in:
Džubara 2024-10-31 23:28:57 +01:00
parent 3a0e028b7e
commit a9c8eb5d28

View File

@ -18,7 +18,7 @@ void check_brackets(const char *code) {
stack[++top] = c; stack[++top] = c;
} else if (c == '}' || c == ']' || c == ')') { } else if (c == '}' || c == ']' || c == ')') {
if (top == -1) { if (top == -1) {
printf("Unexpected closing bracket %c%d\n", c, i); printf("Unexpected closing bracket %c in %d\n", c, i);
return; return;
} }
if (!match(stack[top], c)) { if (!match(stack[top], c)) {