mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 02:18:35 +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
|
#ifdef PLATFORM_WINDOWS
|
||||||
InvalidParameterHandler p;
|
InvalidParameterHandler p;
|
||||||
#endif
|
#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];
|
t = (params[4] == -1) ? g_pSM->GetAdjustedTime() : (time_t)params[4];
|
||||||
written = strftime(buffer, params[2], format, localtime(&t));
|
written = strftime(buffer, params[2], format, localtime(&t));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user