summaryrefslogtreecommitdiff
path: root/src/gui/char_select.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 17:23:45 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-09-13 17:23:45 +0000
commita4ebc80ec3aa5d5b7faf51ad878d11bd4a8915e9 (patch)
treece8b3a08278fe4d6c51f8dad128f0e7051d53168 /src/gui/char_select.cpp
parente7c5d55d6286ca3c535248c76649863b03fb208b (diff)
downloadmana-a4ebc80ec3aa5d5b7faf51ad878d11bd4a8915e9.tar.gz
mana-a4ebc80ec3aa5d5b7faf51ad878d11bd4a8915e9.tar.bz2
mana-a4ebc80ec3aa5d5b7faf51ad878d11bd4a8915e9.tar.xz
mana-a4ebc80ec3aa5d5b7faf51ad878d11bd4a8915e9.zip
Removed some globals.
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r--src/gui/char_select.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index cb85d39c..6389f5b0 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -235,14 +235,19 @@ void CharSelectDialog::serverCharSelect()
flush();
}
char_ID = RFIFOL(2);
+
+ char mapName[17];
+ mapName[17] = 0;
+ strncpy(mapName, RFIFOP(6), 16);
+
memset(map_path, '\0', 480);
strcat(map_path, "maps/");
- strncat(map_path, RFIFOP(6), 479 - strlen(map_path));
+ strncat(map_path, mapName, 479 - strlen(map_path));
map_address = RFIFOL(22);
map_port = RFIFOW(26);
state = GAME;
- logger->log("CharSelect: Map: %s", map_name.c_str());
+ logger->log("CharSelect: Map: %s", mapName);
logger->log("CharSelect: Server: %s:%d", iptostring(map_address), map_port);
RFIFOSKIP(28);
close_session();