Update glTF2AssetWriter.inl (#5647)

The total length is incorrect when exporting gltf2

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
pull/5686/head^2
Fav 2024-08-30 05:55:18 +08:00 committed by GitHub
parent ae0ff8a88a
commit 5e912e68da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -940,7 +940,7 @@ namespace glTF2 {
if (outfile->Write(bodyBuffer->GetPointer(), 1, bodyBuffer->byteLength) != bodyBuffer->byteLength) { if (outfile->Write(bodyBuffer->GetPointer(), 1, bodyBuffer->byteLength) != bodyBuffer->byteLength) {
throw DeadlyExportError("Failed to write body data!"); throw DeadlyExportError("Failed to write body data!");
} }
if (curPaddingLength && outfile->Write(&padding, 1, paddingLength) != paddingLength) { if (curPaddingLength && outfile->Write(&padding, 1, curPaddingLength) != curPaddingLength) {
throw DeadlyExportError("Failed to write body data padding!"); throw DeadlyExportError("Failed to write body data padding!");
} }
} }