Closed helloqinglan closed 9 years ago
SprotoTypeFieldOP.cs中
public SprotoTypeFieldOP (int max_field_count) { int slot_count = max_field_count / slot_bits_size; slot_count = (slot_count > 0)?(slot_count):(1); this.has_bits = new UInt32[slot_count]; }
public SprotoTypeFieldOP (int max_field_count) { int slot_count = max_field_count / slot_bits_size; slot_count = (slot_count > 0)?(slot_count):(1);
this.has_bits = new UInt32[slot_count]; }
slot_count的计算有误 可以修改为
int slot_count = (max_field_count + slot_bits_size - 1) / slot_bits_size;
或者添加
if (max_field_count % slot_bits_size > 0) slot_count++;
thanks~~
SprotoTypeFieldOP.cs中
slot_count的计算有误 可以修改为
或者添加