mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix fatal error on invalid base64.decode input string
This commit is contained in:
parent
00cf6e39ef
commit
3e949bd499
1 changed files with 1 additions and 1 deletions
|
|
@ -349,7 +349,7 @@ std::string util::mangleid(uint64_t value) {
|
|||
util::Buffer<ubyte> util::base64_decode(const char* str, size_t size) {
|
||||
util::Buffer<ubyte> bytes((size / 4) * 3);
|
||||
ubyte* dst = bytes.data();
|
||||
for (size_t i = 0; i < size;) {
|
||||
for (size_t i = 0; i < (size / 4) * 4;) {
|
||||
ubyte a = base64_decode_char(ubyte(str[i++]));
|
||||
ubyte b = base64_decode_char(ubyte(str[i++]));
|
||||
ubyte c = base64_decode_char(ubyte(str[i++]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue