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

If a player name contained a single quote, the command
string sent by the player-point-of-view combobox in the
editor toolbar would be wrong and the server would not
be able to parse the command correctly. The attached
patch changes the take command string to use " instead
of '.


-----------------------------------------------------------------------
そういう名前だと逃げさせない。
diff --git a/client/gui-gtk-2.0/editgui.c b/client/gui-gtk-2.0/editgui.c
index 6270490..0e88e4a 100644
--- a/client/gui-gtk-2.0/editgui.c
+++ b/client/gui-gtk-2.0/editgui.c
@@ -253,7 +253,7 @@ static void editbar_player_pov_combobox_changed(GtkComboBox *combo,
 
   pplayer = valid_player_by_number(id);
   if (pplayer != NULL) {
-    send_chat_printf("/take '%s'", pplayer->name);
+    send_chat_printf("/take \"%s\"", pplayer->name);
   }
 }
 
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to