<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39721 >

This transaction appears to have no content
With gcc-4.2, I have bug.
How to reproduce :
- Start game
- Build a city
- Press F1 (open city panel management)
- select city(ies)
- menu "Change" -> "CMA" -> "Food Max" (anyone except none)
- nothing append

- Open city panel by click on city on map, apply CMA
- Go to F1 panel
- menu "Change" -> "CMA" -> "Food Max" (anyone except none)
- CMA of city is set to none

It's not happend with gcc4.1 and seems due to
when you ask once GINT_TO_POINTER(-1) and after call to
GINT_TO_POINTER(x) is :
GINT_TO_POINTER(x) = GINT_TO_POINTER(-1).

Patch, put CMA called 'none' at the end of list of preset CMA.

Cheers
-- 
Carl
With gcc-4.2, I have bug.
How to reproduce :
- Start game
- Build a city
- Press F1 (open city panel management)
- select city(ies)
- menu "Change" -> "CMA" -> "Food Max" (anyone except none)
- nothing append

- Open city panel by click on city on map, apply CMA
- Go to F1 panel
- menu "Change" -> "CMA" -> "Food Max" (anyone except none)
- CMA of city is set to none

It's not happend with gcc4.1 and seems due to 
when you ask once GINT_TO_POINTER(-1) and after call to
GINT_TO_POINTER(x) is :
GINT_TO_POINTER(x) = GINT_TO_POINTER(-1).

Patch, put CMA called 'none' at the end of list of preset CMA.

Cheers
--
Carl
diff -urNad warclient//server/stdinhand.c warclient.new//server/stdinhand.c
--- warclient//server/stdinhand.c	2007-09-24 18:07:39.000000000 +0200
+++ warclient.new//server/stdinhand.c	2007-09-24 18:23:54.000000000 +0200
@@ -1341,7 +1341,7 @@
 
   sz_strlcpy(buf, arg);
   remove_leading_trailing_spaces(buf);
-  if (!buf || !buf[0])
+  if (!buf[0])
     {
       cmd_reply(CMD_METAMESSAGE, caller, C_COMMENT,
                    _("Metaserver message string is \"%s\"."),
@@ -4859,7 +4859,7 @@
    * srvarg.load_filename, which we edit down below. */
   sz_strlcpy(arg, filename);
 
-  if (!arg || arg[0] == '\0') 
+  if (arg[0] == '\0') 
   {
     cmd_reply(CMD_LOAD, caller, C_FAIL, _("Usage: load <filename>"));
     send_load_game_info(FALSE);
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to