Author: cazfi
Date: Thu Mar  5 20:01:13 2015
New Revision: 28419

URL: http://svn.gna.org/viewcvs/freeciv?rev=28419&view=rev
Log:
Check against empty startunits setting.

See bug #23346

Modified:
    trunk/server/settings.c

Modified: trunk/server/settings.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/settings.c?rev=28419&r1=28418&r2=28419&view=diff
==============================================================================
--- trunk/server/settings.c     (original)
+++ trunk/server/settings.c     Thu Mar  5 20:01:13 2015
@@ -769,6 +769,13 @@
   int len = strlen(value), i;
   Unit_Class_id  first_role;
   bool firstnative = 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. */
   for (i = 0; i < len; i++) {


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to