aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/Connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.World/Connection.cpp')
-rw-r--r--Minecraft.World/Connection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Minecraft.World/Connection.cpp b/Minecraft.World/Connection.cpp
index 7f10dc4a..d4450266 100644
--- a/Minecraft.World/Connection.cpp
+++ b/Minecraft.World/Connection.cpp
@@ -108,8 +108,8 @@ Connection::Connection(Socket *socket, const wstring& id, PacketListener *packet
const char *szId = wstringtofilename(id);
char readThreadName[256];
char writeThreadName[256];
- sprintf(readThreadName,"%s read\n",szId);
- sprintf(writeThreadName,"%s write\n",szId);
+ sprintf_s(readThreadName, sizeof(readThreadName), "%.240s read\n", szId);
+ sprintf_s(writeThreadName, sizeof(writeThreadName), "%.240s write\n", szId);
readThread = new C4JThread(runRead, static_cast<void *>(this), readThreadName, READ_STACK_SIZE);
writeThread = new C4JThread(runWrite, this, writeThreadName, WRITE_STACK_SIZE);