- use FileWriter for the AST dump.

This commit is contained in:
Christoph Oelckers 2017-12-02 12:01:55 +01:00
parent 5e7dfa7cce
commit ab58e4acb0

View file

@ -462,11 +462,11 @@ static void DoParse(int lumpnum)
FString filename = Wads.GetLumpFullPath(lumpnum); FString filename = Wads.GetLumpFullPath(lumpnum);
filename.ReplaceChars(":\\/?|", '.'); filename.ReplaceChars(":\\/?|", '.');
filename << ".ast"; filename << ".ast";
FILE *ff = fopen(filename, "w"); FileWriter *ff = FileWriter::Open(filename);
if (ff != NULL) if (ff != NULL)
{ {
fputs(ast.GetChars(), ff); ff->Write(ast.GetChars(), ast.Len());
fclose(ff); delete ff;
} }
} }