Merge pull request #4934 from turol/terragen_fix
Fix Terragen loaderkimkulling/close_memleak-issue-3416^2
commit
8c6b3fe69a
|
@ -230,8 +230,8 @@ void TerragenImporter::InternReadFile(const std::string &pFile,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get to the next chunk (4 byte aligned)
|
// Get to the next chunk (4 byte aligned)
|
||||||
unsigned dtt = reader.GetCurrentPos();
|
unsigned dtt = reader.GetCurrentPos() & 0x3;
|
||||||
if (dtt & 0x3) {
|
if (dtt) {
|
||||||
reader.IncPtr(4 - dtt);
|
reader.IncPtr(4 - dtt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,13 +48,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
class utTerragenImportExport : public AbstractImportExportBase {
|
class utTerragenImportExport : public AbstractImportExportBase {
|
||||||
public:
|
public:
|
||||||
virtual bool importerTest() {
|
virtual bool importerTest() {
|
||||||
/*Assimp::Importer importer;
|
Assimp::Importer importer;
|
||||||
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/TER/RealisticTerrain.ter", aiProcess_ValidateDataStructure);
|
const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/TER/RealisticTerrain.ter", aiProcess_ValidateDataStructure);
|
||||||
return nullptr != scene;*/
|
return nullptr != scene;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(utTerragenImportExport, importX3DFromFileTest) {
|
TEST_F(utTerragenImportExport, importFromFileTest) {
|
||||||
EXPECT_TRUE(importerTest());
|
EXPECT_TRUE(importerTest());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue