fixed amb1162 - SetUserAdmin() did not work as documented

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401687
This commit is contained in:
David Anderson 2007-11-16 14:04:05 +00:00
parent 0f9a7eee81
commit 4d9ef26dbc

View File

@ -259,7 +259,7 @@ static cell_t SetUserAdmin(IPluginContext *pContext, const cell_t *params)
{
return pContext->ThrowNativeError("Client %d is not connected", client);
}
if (!g_Admins.IsValidAdmin(params[2]))
if (!g_Admins.IsValidAdmin(params[2]) && id != INVALID_ADMIN_ID)
{
return pContext->ThrowNativeError("AdminId %x is invalid", params[2]);
}