diff --git a/code/nel/src/misc/cdb_leaf.cpp b/code/nel/src/misc/cdb_leaf.cpp index 18cc25fb0..b76c22e4d 100644 --- a/code/nel/src/misc/cdb_leaf.cpp +++ b/code/nel/src/misc/cdb_leaf.cpp @@ -134,8 +134,9 @@ inline uint readPackedBitCount(CBitMemStream & f) { uint64 bitCount; f.serial(bitCount, 4); - nlinfo("PACKED: %u bits", (uint32)(bitCount << 2)); - return bitCount << 2; + uint bits = (bitCount << 2) + 4; + nlinfo("PACKED: %u bits", (uint32)(bits)); + return bits; } else { diff --git a/code/ryzom/server/src/entities_game_service/player_manager/cdb_synchronised.cpp b/code/ryzom/server/src/entities_game_service/player_manager/cdb_synchronised.cpp index 0b9a2efd2..28f8a1f40 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/cdb_synchronised.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/cdb_synchronised.cpp @@ -556,11 +556,11 @@ inline void pushPackedValue( CBitMemStream& s, uint64 value, uint32& bitsize, ui if (next) { bits += 4; - test = next; + // test = next; } else { - test = next & 0xF; + // test = next & 0xF; } if (bits + 5 > 64) // 1 bit isPacked, 4 bits bitCount { @@ -573,6 +573,7 @@ inline void pushPackedValue( CBitMemStream& s, uint64 value, uint32& bitsize, ui { uint64 isPacked = 1; uint64 bitCount = bits >> 2; + bits += 4; s.serialAndLog2( isPacked, 1 ); s.serialAndLog2( bitCount, 4 ); s.serialAndLog2( value, bits );