Follow-up Comment #8, patch #1616 (project freeciv):
Before committing, please add to api_actions_create_player after variable
declarations:
SCRIPT_CHECK_ARG_NIL(username, 1, "string", NULL)
the Script API must all check their assumptions and make sure (the best they
can) that wrong arguments can't crash freeciv. The above will make an
argument error if called with a 'nil' name. The '1' is because the argument
error is for argument 1, expected type is 'string'. See other api_actions.c
functions for examples. (I think we added these macros after your first draft
of this patch).
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?1616>
_______________________________________________
Meddelandet skickades via/av Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev