Fixed compiler warning.
Based on fread specification, it returns number of elements which has been read. Here is declared one element with size of whole file (len), so returned value should be always equal to 1.
This commit is contained in:
parent
7b8da0ef34
commit
7a4112e89c
@ -107,7 +107,7 @@ namespace Scripting
|
||||
script.resize(len);
|
||||
int c = fread(&script[0], len, 1, f);
|
||||
fclose(f);
|
||||
if (c == NULL)
|
||||
if (c != 1)
|
||||
{
|
||||
Log::error("Scripting", "Failed to load script file.");
|
||||
return "";
|
||||
|
Loading…
Reference in New Issue
Block a user