[IO]: Forgot to return -1 on func failure (#866)

This commit is contained in:
Edo 2023-03-22 10:48:02 +00:00 committed by GitHub
parent a52337bbac
commit 5766ecef1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,7 @@ namespace Components::GSC
if (std::strstr(filepath, ForbiddenStrings[i]) != nullptr) if (std::strstr(filepath, ForbiddenStrings[i]) != nullptr)
{ {
Logger::PrintError(Game::CON_CHANNEL_PARSERSCRIPT, "OpenFile: directory traversal is not allowed!\n"); Logger::PrintError(Game::CON_CHANNEL_PARSERSCRIPT, "OpenFile: directory traversal is not allowed!\n");
Game::Scr_AddInt(-1);
return; return;
} }
} }