From 32ccf06378af9c0e1080bdc2d9a81af4f95a4c04 Mon Sep 17 00:00:00 2001 From: sunxudong Date: Thu, 23 Apr 2020 12:35:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E5=80=BCbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- serial/build.gradle | 4 ++-- serial/src/main/java/org/sheedon/serial/Request.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/serial/build.gradle b/serial/build.gradle index 9d03e43..a1a10ce 100644 --- a/serial/build.gradle +++ b/serial/build.gradle @@ -8,8 +8,8 @@ android { defaultConfig { minSdkVersion 15 targetSdkVersion 28 - versionCode 5 - versionName "1.2" + versionCode 6 + versionName "1.2.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' diff --git a/serial/src/main/java/org/sheedon/serial/Request.java b/serial/src/main/java/org/sheedon/serial/Request.java index 38e8adc..ff07f3a 100644 --- a/serial/src/main/java/org/sheedon/serial/Request.java +++ b/serial/src/main/java/org/sheedon/serial/Request.java @@ -47,7 +47,7 @@ public long backNameCode() { private long calcBackNameCode(byte[] nameBytes) { long code = 0; for (byte nameByte : nameBytes) { - code = code * 256 + nameByte & 0xFF; + code = code * 256 + (nameByte & 0xFF); } return code; }