Author: cazfi
Date: Mon Jun 20 17:50:00 2016
New Revision: 32929

URL: http://svn.gna.org/viewcvs/freeciv?rev=32929&view=rev
Log:
Made capitalized_string() not to leave last character out from the returned 
string,
or making it broken one in case of multi-byte character.

Reported by Markus Linnakangas <mlinnaka>

See bug #24754

Modified:
    trunk/utility/fcintl.c

Modified: trunk/utility/fcintl.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/utility/fcintl.c?rev=32929&r1=32928&r2=32929&view=diff
==============================================================================
--- trunk/utility/fcintl.c      (original)
+++ trunk/utility/fcintl.c      Mon Jun 20 17:50:00 2016
@@ -64,7 +64,7 @@
   int len = strlen(str);
   char *result = fc_malloc(len + 1);
 
-  fc_strlcpy(result, str, len);
+  fc_strlcpy(result, str, len + 1);
 
   if (autocap) {
     if ((unsigned char) result[0] < 128) {


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

Reply via email to