mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-06 18:08:36 +00:00
Fix old plugin compatibility
This commit is contained in:
parent
a0dff2c8ed
commit
5ef3a3c964
@ -260,7 +260,8 @@ static cell_t FormatTime(IPluginContext *pContext, const cell_t *params)
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
InvalidParameterHandler p;
|
||||
#endif
|
||||
if (params[5])
|
||||
// Older plugins dont have param[5]
|
||||
if (params[0] < 5 || params[5])
|
||||
{
|
||||
t = (params[4] == -1) ? g_pSM->GetAdjustedTime() : (time_t)params[4];
|
||||
written = strftime(buffer, params[2], format, localtime(&t));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user