|
@@ -167,7 +167,7 @@ public class LoginServerThread extends Thread
|
|
|
int receivedBytes = 0;
|
|
|
int newBytes = 0;
|
|
|
int left = length - 2;
|
|
|
- while (newBytes != -1 && receivedBytes < left)
|
|
|
+ while (newBytes != -1 && receivedBytes < length - 2)
|
|
|
{
|
|
|
newBytes = _in.read(incoming, receivedBytes, left);
|
|
|
receivedBytes = receivedBytes + newBytes;
|