Check if sourceLength is -1 instead

This commit is contained in:
smallmodel 2023-08-19 20:46:24 +02:00
parent ec8eaacc69
commit 459aa89ca2
No known key found for this signature in database
GPG key ID: A96F163ED4891440

View file

@ -783,7 +783,7 @@ GameScript *ScriptMaster::GetGameScriptInternal(str& filename)
sourceLength = gi.FS_ReadFile(filename.c_str(), &sourceBuffer, true);
if (sourceLength < 0) {
if (sourceLength == -1) {
throw ScriptException("Can't find '%s'\n", filename.c_str());
}