VR r2348 fix - loading .jpc.7z with a single image would cause exception as file was not considered open (by anv)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8786 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2020-04-20 00:20:37 +00:00
parent 8840353c78
commit 2f576684ac
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -765,7 +765,11 @@ bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents)
{
try
{
LoadPngFile lpng( vfs::tReadableFile::cast(vFiles[0]) );
// VR r2348 fix - loading .jpc.7z with a single image would cause exception as file was not considered open (by anv)
//LoadPngFile lpng(vfs::tReadableFile::cast(vFiles[0]));
vfs::CBufferFile oTempFile("");
oTempFile.copyToBuffer(*vfs::tReadableFile::cast(vFiles[0]));
LoadPngFile lpng(vfs::tReadableFile::cast(&oTempFile));
bool bLoadS = lpng.Load();
+1 -1
View File
@@ -3890,7 +3890,7 @@ if(!GridNoOnVisibleWorldTile(iDestination))
nextCost += 20;
}
}
}
}
newTotCost = curCost + nextCost;