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