mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 00:41:24 +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
|
@ -328,18 +328,20 @@ static TArray<FileEntry> LoadCRCCache(void)
|
|||
|
||||
try
|
||||
{
|
||||
sc.OpenFile(cachepath);
|
||||
while (sc.GetString())
|
||||
if (sc.OpenFile(cachepath))
|
||||
{
|
||||
crclist.Reserve(1);
|
||||
auto &flentry = crclist.Last();
|
||||
flentry.FileName = sc.String;
|
||||
sc.MustGetNumber();
|
||||
flentry.FileLength = sc.BigNumber;
|
||||
sc.MustGetNumber();
|
||||
flentry.FileTime = sc.BigNumber;
|
||||
sc.MustGetNumber();
|
||||
flentry.CRCValue = (unsigned)sc.BigNumber;
|
||||
while (sc.GetString())
|
||||
{
|
||||
crclist.Reserve(1);
|
||||
auto &flentry = crclist.Last();
|
||||
flentry.FileName = sc.String;
|
||||
sc.MustGetNumber();
|
||||
flentry.FileLength = sc.BigNumber;
|
||||
sc.MustGetNumber();
|
||||
flentry.FileTime = sc.BigNumber;
|
||||
sc.MustGetNumber();
|
||||
flentry.CRCValue = (unsigned)sc.BigNumber;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (CRecoverableError &)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue