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:
parent
2cbc450285
commit
8dc4d353e2
@ -2254,7 +2254,8 @@ struct LgStream {
|
|||||||
else if (target.GetType() == OT_INTEGER || target.GetType() == OT_FLOAT) id = target.Cast< int32_t >();
|
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()) {
|
else if (static_cast< AbstractStaticClassData * >(target.GetTypeTag()) == StaticClassTypeTag< LgPlayer >::Get()) {
|
||||||
id = target.CastI< LgPlayer >()->GetIdentifier();
|
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);
|
_Func->SendClientScriptData(id, m_OutputStreamData, m_OutputStreamEnd);
|
||||||
ClearOutput();
|
ClearOutput();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user