And here you are. I set the board to private simply because there's less stuff to deal with, but I'm still getting the same error so...
1807 if( IS_BOARD_FLAG( board, BOARD_PRIVATE ) )
(gdb)
1809 ch_printf( ch, "%2d) %c [%-15s] %-11s %s\r\n", count, unread, pnote->date_stamp, pnote->sender ? pnote->sender : "--Error--", pnote->subject ? pnote->subject : " " );
(gdb) print count
$1 = 1
(gdb) print unread
$2 = 32 ' '
(gdb) print pnote->date_stamp
$3 = 1246064007
(gdb) print pnote->sender
$4 = 0x8e9a690 "Andril"
(gdb) print pnote->subject
$5 = 0x8f52f78 "test"
Now oddly enough, I had attempted the following before but it didn't work out quite the way I'd hoped it would heh.
char buf2[MSL], buf3[MSL]; // declared at beginning of the function
if( IS_BOARD_FLAG( board, BOARD_PRIVATE ) )
{
snprintf( buf2, MSL, pnote->sender ? pnote->sender : "--Error--" );
snprintf( buf3, MSL, pnote->subject ? pnote->subject : " " );
ch_printf( ch, "%2d) %c [%-15s] %-11s %s\r\n", count, unread, pnote->date_stamp, buf2, buf3 );
}
And here's the gdb output from printing buf2 and buf3.
(gdb) print buf2
$5 = "Andril", '\0' <repeats 53740 times>, "#�'\000��ゥソ-�ソ$\000\000\000\000\000\000\000zi \b\000\000\000\000\001�ゥソ�6\000yi
\b\001\000\000\000\234�ゥソ�%\000��ソyi \b\001", '\0' <repeats 19 times>, "�\026��%", '\0' <repeats 17 times>, "\020�ゥソ",
'\0' <repeats 36 times>, "T�ソ", '\0' <repeats 36 times>, "A\000\000\000zi \bqi \b\001\000\000\000s", '\0' <repeats 63 times>,
" ", '\0' <repeats 18 times>, "s$", '\0' <repeats 111 times>, "xi \b", '\0' <repeats 24 times>...
(gdb) print buf3
$6 = "test", '\0' <repeats 62949 times>, "�P$", '\0' <repeats 29 times>, "�ィソ\000\000\000\000\000\000\000\000\231\231\231\031\005",
'\0' <repeats 23 times>, "}\000\000\000\000\000\000\000�6\000\000\000\000\000\000\001\000\000��ソ�P$\000�ィソ�ィソ\n\000\000\000\000
\000\000\000\200�\000�6\000\b�ソP�ソ�ィソ\000\000\000\000\231\231\231\031\005", '\0' <repeats 23 times>, "�003\000\000\000\000\000
\000�6\000\000\000\000\000\000\001\000\0008�ソ�N$\000P�ソP�ソ\n\000\000\000\000\000\000\000\200�\000�6\000h�ソ=c&\000P�"...
Now I'm pretty sure that all that extra stuff shouldn't really be there.
So yeah. You're guess is much better than mine.