cgltf_load_buffer_base64 doesn't handle padding characters
When encoding data to base64 and the input data isn't a multiple of 3 bytes, the output will be padded with equal signs ('=').
cgltf_load_buffer_base64() doesn't handle this character and instead returns cgltf_result_io_error when it encounters that.
Is this somehow by design? As far as I can see from the arguments of that function, there is no way for us to prevent cgltf from reading the padding characters and failing.
We encode our data in one program with one library function and decode it in another app with the cgltf function. The only workaround for us is to pad the input data with zeroes before encoding to base64, to avoid having = at the end.
cgltf_load_buffer_base64() doesn't handle this character and instead returns cgltf_result_io_error when it encounters that.
This means that you're asking cgltf_load_buffer_base64 to decode more bytes than are available; the padding should not be consulted during decoding. Maybe the program that encodes the data specifies incorrect buffer length via buffer.byteLength property?