summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index bb2ac5faf..a44a2e611 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -79,6 +79,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "httpfetch.h"
#include "guiEngine.h"
#include "mapsector.h"
+#include "player.h"
#include "database-sqlite3.h"
#ifdef USE_LEVELDB
@@ -1843,6 +1844,13 @@ int main(int argc, char *argv[])
break;
}
+ if (current_playername.length() > PLAYERNAME_SIZE-1) {
+ error_message = wgettext("Player name to long.");
+ playername = current_playername.substr(0,PLAYERNAME_SIZE-1);
+ g_settings->set("name", playername);
+ continue;
+ }
+
/*
Run game
*/