Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
July 2006: [Freeciv-Dev] Re: No check for player!=NULL in player.c diplomatic state |
[Freeciv-Dev] Re: No check for player!=NULL in player.c diplomatic state[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Egor Vyscrebentsov wrote: Good daytime! common/player.c:pplayers_at_war() does not check players to be not NULLed. (pplayer_get_diplstate(), other pplayers_*() diplomatic state functions and gives_shared_vision don't check too.) I'm not sure this is a bug, because NULLed player should not be passed as argument. But what about assert for this case? A dereference is just as good as an assert. It will crash if a NULL value is passed in. -jason
|