浏览代码

crash out on net stream leaks.
causes a fatal assertion when bitstream is passed an int value it cannot transmit given the provided bit length, and reports what the value and count were, respectively

Azaezel 10 年之前
父节点
当前提交
6201e48501
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Engine/source/core/stream/bitStream.cpp

+ 1 - 1
Engine/source/core/stream/bitStream.cpp

@@ -336,7 +336,7 @@ S32 BitStream::readInt(S32 bitCount)
 
 void BitStream::writeInt(S32 val, S32 bitCount)
 {
-   AssertWarn((bitCount == 32) || ((val >> bitCount) == 0), "BitStream::writeInt: value out of range");
+   AssertFatal((bitCount == 32) || ((val >> bitCount) == 0), avar("BitStream::writeInt: value out of range: %i/%i (%i bits)", val, 1 << bitCount, bitCount));
 
    val = convertHostToLEndian(val);
    writeBits(bitCount, &val);