summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorbibo38 <bibo38@github.com>2016-01-13 07:55:05 +0100
committerbibo38 <bibo38@github.com>2016-01-13 09:55:48 +0100
commit41aa7cf1232941ebe13efb6f64439d38963beb22 (patch)
tree2c5d0cbf249b30b2ff3c4803cf895d0a1ae4fcd8 /src/Entities/Player.cpp
parentMerge pull request #2864 from LogicParrot/compile (diff)
downloadcuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar
cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar.gz
cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar.bz2
cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar.lz
cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar.xz
cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.tar.zst
cuberite-41aa7cf1232941ebe13efb6f64439d38963beb22.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index c5a1e0f95..766161703 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -89,6 +89,8 @@ cPlayer::cPlayer(cClientHandlePtr a_Client, const AString & a_PlayerName) :
m_UUID((a_Client != nullptr) ? a_Client->GetUUID() : ""),
m_CustomName("")
{
+ ASSERT(a_PlayerName.length() <= 16); // Otherwise this player could crash many clients...
+
m_InventoryWindow = new cInventoryWindow(*this);
m_CurrentWindow = m_InventoryWindow;
m_InventoryWindow->OpenedByPlayer(*this);