Già, dovrei! Si trattasse solo di puntatori con valori sballati, qua ad'esempio ho scoperto che la variabile y nel for viene incrementata sino a 4 pur essendo limitata a y<4.

$ gdb a.out
(gdb) list around_of_letter
54
55 /**
56 *
57 *
58 */
59 Letter around_of_letter( Matrix M, Letter L) {
60
61 int x,y;
62 int i=0;
63
(gdb)
64 for(x=0; x<SIDE; x++)
65 for(y=0; y<SIDE; y++) {
66
67 if( distance_between_letters( M[x][y], L ) == 1 )
68 L.around[i++] = &M[x][y]
69 ;
70 else
71 L.around[i++] = NULL
72 ;
73
(gdb) break 64
Breakpoint 1 at 0x4007de: file prova.c, line 64.
(gdb) run
Starting program: /home/dante/Documenti/Ruzzle/0.3/a.out

Breakpoint 1, around_of_letter (M=0x603010, L=...) at prova.c:64
64 for(x=0; x<SIDE; x++)
(gdb) next
65 for(y=0; y<SIDE; y++) {
(gdb) next
67 if( distance_between_letters( M[x][y], L ) == 1 )
(gdb) print y
$1 = 0
(gdb) next
71 L.around[i++] = NULL
(gdb) next
65 for(y=0; y<SIDE; y++) {
(gdb) next
67 if( distance_between_letters( M[x][y], L ) == 1 )
(gdb) print y
$2 = 1
(gdb) next
68 L.around[i++] = &M[x][y]
(gdb) print y
$3 = 1
(gdb) next
65 for(y=0; y<SIDE; y++) {
(gdb) next
67 if( distance_between_letters( M[x][y], L ) == 1 )
(gdb) next
71 L.around[i++] = NULL
(gdb) next
65 for(y=0; y<SIDE; y++) {
(gdb) next
67 if( distance_between_letters( M[x][y], L ) == 1 )
(gdb) next
71 L.around[i++] = NULL
(gdb) next
65 for(y=0; y<SIDE; y++) {
(gdb) next
64 for(x=0; x<SIDE; x++)
(gdb) print y
$4 = 4
(gdb)