[crossfire] 64 bit crossfire musings.

Nicolas Weeger (Laposte) nicolas.weeger at laposte.net
Sat May 20 02:55:00 CDT 2006


>   I use -Wall, which is probably excessive, but does tend to catch some
> other errors.

IMO that should be included in the debug build of server.

>   Note that IMO, asserts should really be used to check the data of passed
> in functions from other functions.

*nods*

>   For data that is passed in from user input, asserts that cause crashes
> probably isn't the correct approach - instead, if the data is bad, the
> server should print a message to the player.  Right now, I think a problem
> is a lot of the DM code really didn't do much data checking of what is
> being passed in.

That is the problematic part.
I could use 'create' to make an item without any spell, or use patch to put a 
negative x value, or something like that. Thus the DMs commands, if we add 
asserts, will have to be hardened to prevent weird things.
I had the idea of extending the create command (via a plugin) to correctly 
check everything before creating an item - so for instance you say "i wanna 
start creating a rod", code says "ok, now you're missing: level, spell", and 
you couldn't actually create the item before everything is alright.

Nicolas



More information about the crossfire mailing list