minor: use File_length_file() instead of File_length()

This commit is contained in:
Thomas Bernard 2018-11-20 14:06:28 +01:00
parent 0d584f4966
commit ca843210d0

View File

@ -2140,11 +2140,11 @@ int Load_CFG(int reload_all)
GFX2_Log(GFX2_DEBUG, "Load_CFG() trying to load %s\n", filename);
file_size=File_length(filename);
if ((Handle=fopen(filename,"rb"))==NULL)
return ERROR_CFG_MISSING;
file_size=File_length_file(Handle);
if ( (file_size<7)
|| (!Read_bytes(Handle, &cfg_header.Signature, 3))
|| memcmp(cfg_header.Signature,"CFG",3)