Author: cazfi
Date: Sat Jan 23 08:19:38 2016
New Revision: 31544

URL: http://svn.gna.org/viewcvs/freeciv?rev=31544&view=rev
Log:
Made isdigit() parameters in cvercmp explicitly 'int'

See patch #6760

Modified:
    branches/S2_5/dependencies/cvercmp/cvercmp.c

Modified: branches/S2_5/dependencies/cvercmp/cvercmp.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/dependencies/cvercmp/cvercmp.c?rev=31544&r1=31543&r2=31544&view=diff
==============================================================================
--- branches/S2_5/dependencies/cvercmp/cvercmp.c        (original)
+++ branches/S2_5/dependencies/cvercmp/cvercmp.c        Sat Jan 23 08:19:38 2016
@@ -110,8 +110,10 @@
   bool solution = false;
 
   for (i = 0; (t1[i] != NULL && t2[i] != NULL) && !solution; i++) {
-    bool d1 = isdigit(t1[i][0]);
-    bool d2 = isdigit(t2[i][0]);
+    int t1c0 = t1[i][0];
+    int t2c0 = t2[i][0];
+    bool d1 = isdigit(t1c0);
+    bool d2 = isdigit(t2c0);
 
     if (d1 && !d2) {
       /* Numbers are always greater than alpha, so don't need to check prever 
*/
@@ -296,16 +298,18 @@
 {
   int i;
   bool alpha;
-
-  if (isdigit(str[0])) {
+  int sc0 = str[0];
+  int sci;
+
+  if (isdigit(sc0)) {
     alpha = false;
   } else {
     alpha = true;
   }
 
-  for (i = 0;
-       str[i] != '\0'
-        && ((alpha && !isdigit(str[i])) || (!alpha && isdigit(str[i])));
+  for (i = 0; sci = str[i],
+         sci != '\0'
+         && ((alpha && !isdigit(sci)) || (!alpha && isdigit(sci)));
        i++) {
   }
 


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

Reply via email to