Author: cazfi
Date: Thu Feb 25 11:06:35 2016
New Revision: 32083

URL: http://svn.gna.org/viewcvs/freeciv?rev=32083&view=rev
Log:
Fixed universal_name_translation() to return names of road and base flags when 
requested,
instead of returning them as MinYear text.

See bug #24446

Modified:
    trunk/common/requirements.c

Modified: trunk/common/requirements.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/requirements.c?rev=32083&r1=32082&r2=32083&view=diff
==============================================================================
--- trunk/common/requirements.c (original)
+++ trunk/common/requirements.c Thu Feb 25 11:06:35 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/**********************************************************************
  Freeciv - Copyright (C) 1996-2004 - The Freeciv Project
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -3214,7 +3214,7 @@
   insert_requirement() for that).
 *****************************************************************************/
 const char *universal_name_translation(const struct universal *psource,
-                                      char *buf, size_t bufsz)
+                                       char *buf, size_t bufsz)
 {
   buf[0] = '\0'; /* to be safe. */
   switch (psource->kind) {
@@ -3398,11 +3398,13 @@
                  /* TRANS: Base flag */
                  Q_("?baseflag:\"%s\" base"),
                  base_flag_id_translated_name(psource->value.baseflag));
+    return buf;
   case VUT_ROADFLAG:
     cat_snprintf(buf, bufsz,
                  /* TRANS: Road flag */
                  Q_("?roadflag:\"%s\" road"),
                  road_flag_id_translated_name(psource->value.roadflag));
+    return buf;
   case VUT_MINYEAR:
     cat_snprintf(buf, bufsz, _("After %s"),
                  textyear(psource->value.minyear));


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

Reply via email to