Follow-up Comment #8, patch #1616 (project freeciv):

Before committing, please add to api_actions_create_player after variable

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:


  Meddelandet skickades via/av Gna!

Freeciv-dev mailing list

Reply via email to