Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: core dump



joe@unipress.com wrote:
> Also, forgot to mention that I get core dumps;
> 
> () at 0x35004
> add_string(str = (nil)), line 111 in "shstr.c"
> attack_ob(op = 0xbf598, hitter = 0xc4574), line 310 in "main.c"
> move_monster(op = 0xc4574), line 475 in "main.c"
> process_events(), line 1776 in "main.c"
> main(argc = 1, argv = 0xf7fffab4, env = 0xf7fffabc), line 2018 in "main.c"
> 
> Obviously, add_string isn't prepared to deal with null pointers.  Perhaps all
> this needs is an if (!str) return;.

When I wrote shstr.c, I asked Frank if I should add in that sanity
check. He said that if I was passed a NULL, something so seriously
wrong had happened that he wanted a core dump to look at :-)
Most core dumps happen in add_string() or free_string().


Kjetil T.