From 027bb7789ca861d9773ffc8a0cfc3ee1d8968b4c Mon Sep 17 00:00:00 2001 From: dreamsfly Date: Fri, 24 Sep 2021 11:06:39 +0000 Subject: [PATCH] =?UTF-8?q?update=20android=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E4=BB=A3=E7=A0=81/java/weaving/socket/Wclient.java.=20if(item>?= =?UTF-8?q?=3D0)=20=20=20=20=20ret=20+=3D=20((item)=20<<=20i);=20else=20?= =?UTF-8?q?=20=20=20ret=20+=3D=20((item&=200xFF)=20<<=20i);?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android客户端代码/java/weaving/socket/Wclient.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android客户端代码/java/weaving/socket/Wclient.java b/android客户端代码/java/weaving/socket/Wclient.java index 5457e37..9486edc 100644 --- a/android客户端代码/java/weaving/socket/Wclient.java +++ b/android客户端代码/java/weaving/socket/Wclient.java @@ -99,7 +99,10 @@ public class Wclient { int i = 0; for (byte item : list) { - ret += ((item& 0xFF) << i); + if(item>=0) + ret += ((item) << i); +else + ret += ((item& 0xFF) << i); i += 8; } return ret;