- handled all other uses of fopen that could reasonably converted to FileReader or FileWriter.
This commit is contained in:
parent
4003e7ca11
commit
7d0759e2fa
5 changed files with 20 additions and 20 deletions
|
|
@ -2488,17 +2488,16 @@ bool D_LoadDehLump(int lumpnum)
|
|||
|
||||
bool D_LoadDehFile(const char *patchfile)
|
||||
{
|
||||
FILE *deh;
|
||||
FileReader fr;
|
||||
|
||||
deh = fopen(patchfile, "rb");
|
||||
if (deh != NULL)
|
||||
if (!fr.Open(patchfile))
|
||||
{
|
||||
PatchSize = Q_filelength(deh);
|
||||
PatchSize = fr.GetLength();
|
||||
|
||||
PatchName = copystring(patchfile);
|
||||
PatchFile = new char[PatchSize + 1];
|
||||
fread(PatchFile, 1, PatchSize, deh);
|
||||
fclose(deh);
|
||||
fr.Read(PatchFile, PatchSize);
|
||||
fr.Close();
|
||||
PatchFile[PatchSize] = '\0'; // terminate with a '\0' character
|
||||
return DoDehPatch();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue