summaryrefslogtreecommitdiff
path: root/src/gui/char_select.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-14 00:41:04 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-14 00:41:04 +0000
commit486c57304076b7352a588dff08c2b976a76e1608 (patch)
treea25c2f946e1ecb24be097307573b38b993a0ca0e /src/gui/char_select.cpp
parent3dc311a652d1fda1252903a974920395e56e5668 (diff)
downloadmana-486c57304076b7352a588dff08c2b976a76e1608.tar.gz
mana-486c57304076b7352a588dff08c2b976a76e1608.tar.bz2
mana-486c57304076b7352a588dff08c2b976a76e1608.tar.xz
mana-486c57304076b7352a588dff08c2b976a76e1608.zip
Converted map_path from char array to std::string.
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r--src/gui/char_select.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index 071708b8..862e659d 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -24,6 +24,7 @@
#include "char_select.h"
#include <sstream>
+#include <string>
#include <SDL.h>
#include <guichan/widgets/label.hpp>
@@ -230,14 +231,14 @@ void CharSelectDialog::serverCharSelect()
if (msg.getId() == 0x0071)
{
char_ID = msg.readLong();
- std::string mapPath = "maps/" + msg.readString(16);
- strcpy(map_path, mapPath.c_str());
+ map_path = "maps/" + msg.readString(16);
+ map_path= map_path.substr(0, map_path.rfind(".")) + ".tmx.gz";
map_address = msg.readLong();
map_port = msg.readShort();
player_info = char_info[0];
state = GAME;
- logger->log("CharSelect: Map: %s", map_path);
+ logger->log("CharSelect: Map: %s", map_path.c_str());
logger->log("CharSelect: Server: %s:%d", iptostring(map_address),
map_port);
close_session();