mirror of
https://github.com/KevinWG/OSS.Common.git
synced 2026-10-23 09:58:52 +08:00
修复位数的问题
This commit is contained in:
@@ -106,8 +106,8 @@ namespace OSS.Common.ComUtils
|
||||
throw new ArgumentOutOfRangeException("code", "the code is not from [ToCode] method !");
|
||||
|
||||
value <<= 5;
|
||||
if (count == 13 && i == 12)
|
||||
value = value ^ (num & 0x03); // 最高位只有两位
|
||||
if (i == 12)
|
||||
value = value ^ (num & 0x0F); // 最高位只有四位
|
||||
else
|
||||
value = value ^ num;
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user