Author: cazfi
Date: Sun Aug 16 15:31:12 2015
New Revision: 29552

URL: http://svn.gna.org/viewcvs/freeciv?rev=29552&view=rev
Log:
Give an error about newline in the end of an entryline of the ini-file.
This at least makes user aware of the fact that there's a problem.

Silently dropped entrylines reported by Caedo

See patch #6230

Modified:
    trunk/utility/inputfile.c

Modified: trunk/utility/inputfile.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/utility/inputfile.c?rev=29552&r1=29551&r2=29552&view=diff
==============================================================================
--- trunk/utility/inputfile.c   (original)
+++ trunk/utility/inputfile.c   Sun Aug 16 15:31:12 2015
@@ -73,6 +73,7 @@
 
 /* utility */
 #include "astring.h"
+#include "fcintl.h"
 #include "ioz.h"
 #include "log.h"
 #include "mem.h"
@@ -477,6 +478,9 @@
 
     if (!ret) {
       /* fgets failed */
+      if (pos > 0) {
+        inf_log(inf, LOG_ERROR, _("End-of-file not in line of its own"));
+      }
       inf->at_eof = TRUE;
       if (inf->in_string) {
         /* Note: Don't allow multi-line strings to cross "include"


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

Reply via email to