diff --git a/src/scriptengine/script_engine.cpp b/src/scriptengine/script_engine.cpp index aae89ce57..3db73c2b8 100644 --- a/src/scriptengine/script_engine.cpp +++ b/src/scriptengine/script_engine.cpp @@ -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 "";