diff --git a/code/glTFExporter.cpp b/code/glTFExporter.cpp index 203a46040..4dff289ac 100644 --- a/code/glTFExporter.cpp +++ b/code/glTFExporter.cpp @@ -511,7 +511,7 @@ void glTFExporter::ExportMeshes() // Variables needed for compression. END. std::string fname = std::string(mFilename); - std::string bufferIdPrefix = fname.substr(0, fname.find(".")); + std::string bufferIdPrefix = fname.substr(0, fname.rfind(".gltf")); std::string bufferId = mAsset->FindUniqueID("", bufferIdPrefix.c_str()); Ref b = mAsset->GetBodyBuffer();