Fixed an uninitialised string causing weird results.
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402292
This commit is contained in:
parent
42359a243a
commit
29de57d415
@ -65,14 +65,14 @@ bool TF2Tools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
{
|
||||
if (strcmp(g_pSM->GetGameFolderName(), "tf") != 0)
|
||||
{
|
||||
snprintf(error, maxlength, "Cannot Load TF2 Extension on mods other than TF2");
|
||||
UTIL_Format(error, maxlength, "Cannot Load TF2 Extension on mods other than TF2");
|
||||
return false;
|
||||
}
|
||||
|
||||
ServerClass *sc = UTIL_FindServerClass("CTFPlayer");
|
||||
if (sc == NULL)
|
||||
{
|
||||
snprintf(error, maxlength, "Could not find CTFPlayer server class");
|
||||
UTIL_Format(error, maxlength, "Could not find CTFPlayer server class");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -80,18 +80,18 @@ bool TF2Tools::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
|
||||
if (!UTIL_FindDataTable(sc->m_pTable, "DT_TFPlayerShared", playerSharedOffset, 0))
|
||||
{
|
||||
snprintf(error, maxlength, "Could not find DT_TFPlayerShared data table");
|
||||
UTIL_Format(error, maxlength, "Could not find DT_TFPlayerShared data table");
|
||||
return false;
|
||||
}
|
||||
|
||||
sharesys->AddDependency(myself, "bintools.ext", true, true);
|
||||
|
||||
char conf_error[255];
|
||||
char conf_error[255] = "";
|
||||
if (!gameconfs->LoadGameConfigFile("sm-tf2.games", &g_pGameConf, conf_error, sizeof(conf_error)))
|
||||
{
|
||||
if (conf_error)
|
||||
{
|
||||
snprintf(error, maxlength, "Could not read sm-tf2.games.txt: %s", conf_error);
|
||||
UTIL_Format(error, maxlength, "Could not read sm-tf2.games.txt: %s", conf_error);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user