Merge pull request #1 from Fav/Fav-patch-1

Update glTF2AssetWriter.inl
pull/5647/head
Fav 2024-07-01 15:27:12 +08:00 committed by GitHub
commit a90b3a9ef9
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) {
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!");
}
}