diff --git a/src/d2gs/telnetd.cpp b/src/d2gs/telnetd.cpp index 0454826..8f56424 100644 --- a/src/d2gs/telnetd.cpp +++ b/src/d2gs/telnetd.cpp @@ -424,7 +424,7 @@ namespace pvpgn continue; } if (admin_to_stop()) return -1; - if ((bytes=recv(ns, mybuf, sizeof(mybuf), 0))<=0) + if ((bytes=recv(ns, mybuf, sizeof(mybuf) - 1, 0))<=0) return -1; timeoutcount = 0; *(mybuf+bytes) = '\0';