From 8d405d60d94aecfe383dabf9c4cb2b1ba3ca6813 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Fri, 3 Feb 2023 11:44:27 +0200 Subject: [PATCH] Fix Terragen loader Fixes e8d2b840178b2b22336eb02b2535f32f3d5cc37b --- code/AssetLib/Terragen/TerragenLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/AssetLib/Terragen/TerragenLoader.cpp b/code/AssetLib/Terragen/TerragenLoader.cpp index dcf01461a..738ad8e27 100644 --- a/code/AssetLib/Terragen/TerragenLoader.cpp +++ b/code/AssetLib/Terragen/TerragenLoader.cpp @@ -230,8 +230,8 @@ void TerragenImporter::InternReadFile(const std::string &pFile, } // Get to the next chunk (4 byte aligned) - unsigned dtt = reader.GetCurrentPos(); - if (dtt & 0x3) { + unsigned dtt = reader.GetCurrentPos() & 0x3; + if (dtt) { reader.IncPtr(4 - dtt); } }