瀏覽代碼

Update glTF2AssetWriter.inl (#5647)

The total length is incorrect when exporting gltf2

Co-authored-by: Kim Kulling <[email protected]>
Fav 1 年之前
父節點
當前提交
5e912e68da
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      code/AssetLib/glTF2/glTF2AssetWriter.inl

+ 1 - 1
code/AssetLib/glTF2/glTF2AssetWriter.inl

@@ -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!");
             }
         }