So, My problem here is that I am getting the wrong int from this array and I dont know why.
Notice that:
pacients.birth = 09/07/1997
in this case.
Using GDB, thats what I have:
Breakpoint 1, ident () at fm.c:72
72 int last = strlen(pacients.birth);
(gdb) n
74 int unidade = pacients.birth[last-1] - '0';
(gdb) n
75 int dezena = pacients.birth[last-2] - '0';
(gdb) p last
$1 = 10
(gdb) p unidade
$2 = 7
(gdb) p dezena
$3 = 1210253312
(gdb)
Notice that $1 and $2 are correct, but $3 Im getting garbage here...