Author: jtn
Date: Mon Nov 30 22:15:05 2015
New Revision: 30821

URL: http://svn.gna.org/viewcvs/freeciv?rev=30821&view=rev
Log:
Fix assertion failure and blank barbarian name in the case where a dead
barbarian player was revived but no leader names were available for its
nation.

See gna bug #24130.

Modified:
    branches/S2_6/server/barbarian.c

Modified: branches/S2_6/server/barbarian.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/barbarian.c?rev=30821&r1=30820&r2=30821&view=diff
==============================================================================
--- branches/S2_6/server/barbarian.c    (original)
+++ branches/S2_6/server/barbarian.c    Mon Nov 30 22:15:05 2015
@@ -109,8 +109,8 @@
          * This is needed in case ruleset defines just one leader for
          * barbarian nation. */
         old_barbs->name[0] = '\0';
-        sz_strlcpy(old_barbs->name,
-                   pick_random_player_name(nation_of_player(old_barbs)));
+        server_player_set_name(old_barbs,
+            pick_random_player_name(nation_of_player(old_barbs)));
         sz_strlcpy(old_barbs->username, _(ANON_USER_NAME));
         old_barbs->unassigned_user = TRUE;
         /* I need to make them to forget the map, I think */


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

Reply via email to