1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Check for out of range.

This commit is contained in:
Sandu Liviu Catalin 2021-03-21 11:03:20 +02:00
parent 2cbc450285
commit 8dc4d353e2

View File

@ -2254,7 +2254,8 @@ struct LgStream {
else if (target.GetType() == OT_INTEGER || target.GetType() == OT_FLOAT) id = target.Cast< int32_t >();
else if (static_cast< AbstractStaticClassData * >(target.GetTypeTag()) == StaticClassTypeTag< LgPlayer >::Get()) {
id = target.CastI< LgPlayer >()->GetIdentifier();
} else STHROWF("Invalid target");
} else STHROWF("Invalid target type");
if (id > SQMOD_PLAYER_POOL) STHROWF("Invalid player ID");
_Func->SendClientScriptData(id, m_OutputStreamData, m_OutputStreamEnd);
ClearOutput();
}