wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src multiplayer_lobby.cpp network_worke...


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src multiplayer_lobby.cpp network_worke...
Date: Sun, 13 Mar 2005 05:32:22 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    05/03/13 10:32:22

Modified files:
        src            : multiplayer_lobby.cpp network_worker.cpp 

Log message:
        Incorrect format argument qualifier.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_lobby.cpp.diff?tr1=1.66&tr2=1.67&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/network_worker.cpp.diff?tr1=1.21&tr2=1.22&r1=text&r2=text

Patches:
Index: wesnoth/src/multiplayer_lobby.cpp
diff -u wesnoth/src/multiplayer_lobby.cpp:1.66 
wesnoth/src/multiplayer_lobby.cpp:1.67
--- wesnoth/src/multiplayer_lobby.cpp:1.66      Fri Mar 11 12:06:44 2005
+++ wesnoth/src/multiplayer_lobby.cpp   Sun Mar 13 10:32:21 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_lobby.cpp,v 1.66 2005/03/11 12:06:44 j_daniel Exp $ */
+/* $Id: multiplayer_lobby.cpp,v 1.67 2005/03/13 10:32:21 silene Exp $ */
 /*
    Copyright (C) 
    Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -88,12 +88,12 @@
                                const surface 
mini(image::getMinimap(100,100,map,0));
 
                                //generate a unique id to show the map as
-                               char buf[50];
-                               sprintf(buf,"addr 
%lu",(size_t)(SDL_Surface*)mini);
+                               std::stringstream id;
+                               id << "addr " << mini.get();
+                               std::string const &image_id = id.str();
+                               image::register_image(image_id, mini);
 
-                               image::register_image(buf,mini);
-
-                               str << "&" << buf << COLUMN_SEPARATOR;
+                               str << "&" << image_id << COLUMN_SEPARATOR;
                        } catch(gamemap::incorrect_format_exception& e) {
                                std::cerr << "illegal map: " << e.msg_ << "\n";
                        }
Index: wesnoth/src/network_worker.cpp
diff -u wesnoth/src/network_worker.cpp:1.21 wesnoth/src/network_worker.cpp:1.22
--- wesnoth/src/network_worker.cpp:1.21 Thu Mar 10 20:59:20 2005
+++ wesnoth/src/network_worker.cpp      Sun Mar 13 10:32:21 2005
@@ -362,4 +362,4 @@
        return current_transfer_stats;
 }
 
-}
\ No newline at end of file
+}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]