summaryrefslogtreecommitdiff
path: root/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp')
-rw-r--r--examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp b/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp
index 253a338e0..7714a52fb 100644
--- a/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp
+++ b/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp
@@ -1458,13 +1458,9 @@ bool BulletMJCFImporter::loadMJCF(const char* fileName, MJCFErrorLogger* logger,
char destBuffer[8192];
char* line = 0;
- do
+ while (m_data->m_fileIO->readLine(fileId, destBuffer, 8192))
{
- line = m_data->m_fileIO->readLine(fileId, destBuffer, 8192);
- if (line)
- {
- xml_string += (std::string(destBuffer) + "\n");
- }
+ xml_string += (std::string(destBuffer) + "\n");
}
while (line);
m_data->m_fileIO->fileClose(fileId);