diff --git a/a2/program.c b/a2/program.c index 412bdb5..53e6caa 100644 --- a/a2/program.c +++ b/a2/program.c @@ -126,10 +126,10 @@ int main(){ hej = 3; //puts("ahoj"); printf("Read: %s", r); - if (r[i] == '}'){printf("Unexpected closing bracket } in %d\n", i+1);} - else if (r[i] == ')'){printf("Unexpected closing bracket ) in %d\n", i+1);} - else if (r[i] == ']'){printf("Unexpected closing bracket ] in %d\n", i+1);} - else if (r[i] == '>'){printf("Unexpected closing bracket > in %d\n", i+1);} + if (r[i] == '}'){printf("Unexpected closing bracket } in %d\n", i);} + else if (r[i] == ')'){printf("Unexpected closing bracket ) in %d\n", i);} + else if (r[i] == ']'){printf("Unexpected closing bracket ] in %d\n", i);} + else if (r[i] == '>'){printf("Unexpected closing bracket > in %d\n", i);} i = n - 2; } i++;