mirror of
https://github.com/status-im/qzxing.git
synced 2025-02-19 22:28:21 +00:00
fix to the toBytes at initial check.
This commit is contained in:
parent
977022f63f
commit
095b27a4b2
@ -206,8 +206,8 @@ void BitArray::xor_(const BitArray& other)
|
|||||||
|
|
||||||
void BitArray::toBytes(int bitOffset, std::vector<char>& array, int offset, int numBytes)
|
void BitArray::toBytes(int bitOffset, std::vector<char>& array, int offset, int numBytes)
|
||||||
{
|
{
|
||||||
if(array.size() < numBytes)
|
if(array.size() < (numBytes + offset))
|
||||||
array.resize(numBytes);
|
array.resize(numBytes + offset);
|
||||||
|
|
||||||
for (int i = 0; i < numBytes; i++) {
|
for (int i = 0; i < numBytes; i++) {
|
||||||
int theByte = 0;
|
int theByte = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user