mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
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:
@@ -765,7 +765,11 @@ bool LoadJPCFileToImage(HIMAGE hImage, UINT16 fContents)
|
|||||||
{
|
{
|
||||||
try
|
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();
|
bool bLoadS = lpng.Load();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -3890,7 +3890,7 @@ if(!GridNoOnVisibleWorldTile(iDestination))
|
|||||||
nextCost += 20;
|
nextCost += 20;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newTotCost = curCost + nextCost;
|
newTotCost = curCost + nextCost;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user