修正ByteArray构造函数的一个BUG
This commit is contained in:
parent
216d641640
commit
b5cadce3a3
|
@ -86,7 +86,7 @@ bool BlockStorage::Write(uint address, const Buffer& bs) const
|
|||
#else
|
||||
byte bb[0x800];
|
||||
#endif
|
||||
Buffer ms(bb, ArrayLength(bb));
|
||||
Buffer ms(bb, sizeof(bb));
|
||||
ms.SetLength(Block);
|
||||
|
||||
// 写入第一个半块
|
||||
|
|
6
Type.cpp
6
Type.cpp
|
@ -706,12 +706,14 @@ bool operator!=(const Array& bs1, const Array& bs2)
|
|||
|
||||
ByteArray::ByteArray(int length) : Array(Arr, sizeof(Arr))
|
||||
{
|
||||
_Length = length;
|
||||
//_Length = length;
|
||||
SetLength(length);
|
||||
}
|
||||
|
||||
ByteArray::ByteArray(byte item, int length) : Array(Arr, sizeof(Arr))
|
||||
{
|
||||
_Length = length;
|
||||
//_Length = length;
|
||||
SetLength(length);
|
||||
Set(item, 0, length);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue