mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-05 18:25:26 +00:00
fix[protocol]: 修复写入string的时候,写入长度的时没有做zigzag操作
This commit is contained in:
@@ -156,6 +156,8 @@ public abstract class ByteBufUtils {
|
||||
|
||||
|
||||
private static int writeIntCount(int value) {
|
||||
value = (value << 1) ^ (value >> 31);
|
||||
|
||||
if (value >>> 7 == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user