fix base64 padding when loading a gltf file (#11053)

# Objective

- After #10336, some gltf files fail to load (examples
custom_gltf_vertex_attribute, gltf_skinned_mesh, ...)
- Fix them

## Solution

- Allow padding in base 64 decoder
This commit is contained in:
François 2023-12-21 21:00:51 +01:00 committed by GitHub
parent 37e80745d2
commit 8666b076d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1448,7 +1448,7 @@ impl<'a> DataUri<'a> {
fn decode(&self) -> Result<Vec<u8>, base64::DecodeError> {
if self.base64 {
base64::Engine::decode(&base64::engine::general_purpose::STANDARD_NO_PAD, self.data)
base64::Engine::decode(&base64::engine::general_purpose::STANDARD, self.data)
} else {
Ok(self.data.as_bytes().to_owned())
}