Fix glTF base64 precedence issue;

This commit is contained in:
bjorn 2022-03-25 12:22:07 -07:00
parent 56dbb346e7
commit 985d8c7a61
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ static void* decodeBase64(char* str, size_t length, size_t* decodedLength) {
}
length -= s - str;
int padding = s[length - 1] == '=' + s[length - 2] == '=';
int padding = (s[length - 1] == '=') + (s[length - 2] == '=');
*decodedLength = length / 4 * 3 - padding;
uint8_t* data = malloc(*decodedLength);
if (!data) {