浏览代码

update [4332]. Thx Nbali.

JIV 15 年之前
父节点
当前提交
ef0272dd6b

+ 1 - 1
L2_GameServer/java/com/l2jserver/gameserver/LoginServerThread.java

@@ -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;

+ 1 - 1
L2_GameServer/java/com/l2jserver/loginserver/GameServerThread.java

@@ -114,7 +114,7 @@ public class GameServerThread 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(data, receivedBytes, left);
 					receivedBytes = receivedBytes + newBytes;