Author: cazfi Date: Thu Mar 5 20:01:32 2015 New Revision: 28422 URL: http://svn.gna.org/viewcvs/freeciv?rev=28422&view=rev Log: Check against empty startunits setting.
See bug #23346 Modified: branches/S2_4/server/settings.c Modified: branches/S2_4/server/settings.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_4/server/settings.c?rev=28422&r1=28421&r2=28422&view=diff ============================================================================== --- branches/S2_4/server/settings.c (original) +++ branches/S2_4/server/settings.c Thu Mar 5 20:01:32 2015 @@ -663,6 +663,13 @@ int len = strlen(value), i; bool have_founder = FALSE; + if (len == 0) { + settings_snprintf(reject_msg, reject_msg_len, + _("Starting units string cannot be empty.")); + + return FALSE; + } + /* We check each character individually to see if it's valid, and * also make sure there is at least one city founder. */ _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits