fix: general moment
This commit is contained in:
parent
568ab4ee92
commit
ee4efc778c
@ -170,10 +170,14 @@ namespace gsc
|
|||||||
const auto* script_file = files[i];
|
const auto* script_file = files[i];
|
||||||
console::info("Loading script %s...\n", script_file);
|
console::info("Loading script %s...\n", script_file);
|
||||||
|
|
||||||
sprintf_s(path, "%s/%s", "scripts", script_file);
|
const auto len = sprintf_s(path, "%s/%s", "scripts", script_file);
|
||||||
|
if (len == -1)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Scr_LoadScriptInternal will add the '.gsc' suffix so we remove it
|
// Scr_LoadScriptInternal will add the '.gsc' suffix so we remove it
|
||||||
path[std::strlen(path) - 4] = '\0';
|
path[len - 4] = '\0';
|
||||||
|
|
||||||
if (!game::native::Scr_LoadScript(path))
|
if (!game::native::Scr_LoadScript(path))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user