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:
Deve 2015-08-12 18:37:31 +02:00
parent 7b8da0ef34
commit 7a4112e89c

View File

@ -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 "";