Fix underflow bug in Base64_EncodeBlock
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5673 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
843f971e2c
commit
9c348a4bc8
1 changed files with 2 additions and 0 deletions
|
@ -6066,6 +6066,8 @@ size_t Base64_EncodeBlock(const qbyte *in, size_t length, char *out, size_t outs
|
|||
if (out < end) *out++ = (length>=3)?Base64_Encode((v>>0)&63):'=';
|
||||
|
||||
in+=3;
|
||||
if (length <= 3)
|
||||
break;
|
||||
length -= 3;
|
||||
}
|
||||
end++;
|
||||
|
|
Loading…
Reference in a new issue