mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 12:10:53 +00:00
- fix loading of CRC cache if file does not exist.
This commit is contained in:
parent
4654fd648d
commit
587a5d5d9a
2 changed files with 14 additions and 12 deletions
|
@ -1119,7 +1119,7 @@ void FScanner::CheckOpen()
|
||||||
{
|
{
|
||||||
if (ScriptOpen == false)
|
if (ScriptOpen == false)
|
||||||
{
|
{
|
||||||
I_FatalError ("SC_ call before SC_Open().");
|
I_Error ("SC_ call before SC_Open().");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -328,18 +328,20 @@ static TArray<FileEntry> LoadCRCCache(void)
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
sc.OpenFile(cachepath);
|
if (sc.OpenFile(cachepath))
|
||||||
while (sc.GetString())
|
|
||||||
{
|
{
|
||||||
crclist.Reserve(1);
|
while (sc.GetString())
|
||||||
auto &flentry = crclist.Last();
|
{
|
||||||
flentry.FileName = sc.String;
|
crclist.Reserve(1);
|
||||||
sc.MustGetNumber();
|
auto &flentry = crclist.Last();
|
||||||
flentry.FileLength = sc.BigNumber;
|
flentry.FileName = sc.String;
|
||||||
sc.MustGetNumber();
|
sc.MustGetNumber();
|
||||||
flentry.FileTime = sc.BigNumber;
|
flentry.FileLength = sc.BigNumber;
|
||||||
sc.MustGetNumber();
|
sc.MustGetNumber();
|
||||||
flentry.CRCValue = (unsigned)sc.BigNumber;
|
flentry.FileTime = sc.BigNumber;
|
||||||
|
sc.MustGetNumber();
|
||||||
|
flentry.CRCValue = (unsigned)sc.BigNumber;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (CRecoverableError &)
|
catch (CRecoverableError &)
|
||||||
|
|
Loading…
Reference in a new issue