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:
@@ -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 "";
|
||||
|
||||
Reference in New Issue
Block a user