Fixing compiler warnings (addresses #388)

This commit is contained in:
Jon Siwek 2011-11-01 14:44:38 -05:00
parent c2683afc01
commit cec4600d2e
15 changed files with 54 additions and 53 deletions

View file

@ -88,7 +88,8 @@ bool LoadPolicyFileText(const char* policy_filename)
// ### This code is not necessarily Unicode safe!
// (probably fine with UTF-8)
pf->filedata = new char[size+1];
fread(pf->filedata, size, 1, f);
if ( fread(pf->filedata, size, 1, f) != 1 )
reporter->InternalError("Failed to fread() file data");
pf->filedata[size] = 0;
fclose(f);