Aligned assert with subtraction that follows
parent
e32a6c0ad6
commit
f700100fd5
|
|
@ -57,7 +57,7 @@ size_t BaseN_Encoder::Put2(const byte *begin, size_t length, int messageEnd, boo
|
||||||
unsigned int b = begin[m_inputPosition++], bitsLeftInSource = 8;
|
unsigned int b = begin[m_inputPosition++], bitsLeftInSource = 8;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
assert(m_bitPos < m_bitsPerChar);
|
assert(m_bitsPerChar-m_bitPos >= 0);
|
||||||
unsigned int bitsLeftInTarget = (unsigned int)(m_bitsPerChar-m_bitPos);
|
unsigned int bitsLeftInTarget = (unsigned int)(m_bitsPerChar-m_bitPos);
|
||||||
m_outBuf[m_bytePos] |= b >> (8-bitsLeftInTarget);
|
m_outBuf[m_bytePos] |= b >> (8-bitsLeftInTarget);
|
||||||
if (bitsLeftInSource >= bitsLeftInTarget)
|
if (bitsLeftInSource >= bitsLeftInTarget)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue