[Freeciv-Dev] (PR#39721) Change CMA by F1 panel don't work (gcc-4.2 specific bug)
http://bugs.freeciv.org/Ticket/Display.html?id=39721 > > [guest - Mar. Sep. 25 17:33:44 2007]: > > > [EMAIL PROTECTED] - Mar. Sep. 25 16:17:25 2007]: > > > > Cette opération semble ne pas avoir de contenu > > > Hmmm, I submitted wrong patch file sorry... > I already deleted this ticket, use PR#39722, where the patch is the good one ^_^. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39721) Change CMA by F1 panel don't work (gcc-4.2 specific bug)
http://bugs.freeciv.org/Ticket/Display.html?id=39721 > > [EMAIL PROTECTED] - Mar. Sep. 25 16:17:25 2007]: > > Cette opération semble ne pas avoir de contenu > Hmmm, I submitted wrong patch file sorry... diff -urda client/gui-gtk-2.0/cityrep.c.orig client/gui-gtk-2.0/cityrep.c --- client/gui-gtk-2.0/cityrep.c.orig 2007-07-09 11:59:02.0 +0200 +++ client/gui-gtk-2.0/cityrep.c 2007-09-25 18:26:47.0 +0200 @@ -470,7 +470,7 @@ gtk_tree_model_get(GTK_TREE_MODEL(city_model), it, 0, &res, -1); pcity = res; - if (idx == CMA_NONE) { + if (idx == cmafec_preset_num()) { cma_release_city(pcity); } else { cma_put_city_under_agent(pcity, cmafec_preset_get_parameter(idx)); @@ -548,8 +548,8 @@ gtk_menu_item_set_submenu(parent_item, menu); if (change_cma) { -for (i = -1; i < cmafec_preset_num(); i++) { - w = (i == -1 ? gtk_menu_item_new_with_label(_("none")) +for (i = 0; i <= cmafec_preset_num(); i++) { + w = (i == cmafec_preset_num() ? gtk_menu_item_new_with_label(_("none")) : gtk_menu_item_new_with_label(cmafec_preset_get_descr(i))); gtk_menu_shell_append(GTK_MENU_SHELL(menu), w); g_signal_connect(w, "activate", G_CALLBACK(select_cma_callback), ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39721) Change CMA by F1 panel don't work (gcc-4.2 specific bug)
http://bugs.freeciv.org/Ticket/Display.html?id=39721 > 2007/9/25, Pepeto _ <[EMAIL PROTECTED]>: > > > http://bugs.freeciv.org/Ticket/Display.html?id=39721 > > > PR#39722 duplication... > Fuck wrong patch -- Carl 2007/9/25, Pepeto _ <[EMAIL PROTECTED]>: http://bugs.freeciv.org/Ticket/Display.html?id=39721 >PR#39722 duplication...Fuck wrong patch -- Carl ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39721) Change CMA by F1 panel don't work (gcc-4.2 specific bug)
http://bugs.freeciv.org/Ticket/Display.html?id=39721 > PR#39722 duplication... ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39721) Change CMA by F1 panel don't work (gcc-4.2 specific bug)
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 toGINT_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.0 +0200 +++ warclient.new//server/stdinhand.c 2007-09-24 18:23:54.0 +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 ")); send_load_game_info(FALSE); ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev