1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Verify NetworkActions access

This commit is contained in:
Michał Janiszewski
2016-07-26 16:07:33 +02:00
committed by Ted John
parent 67d4ff83e5
commit 82d52b63e6

View File

@@ -2296,7 +2296,12 @@ int network_get_num_actions()
rct_string_id network_get_action_name_string_id(unsigned int index)
{
return NetworkActions::Actions[index].Name;
if (index < NetworkActions::Actions.size())
{
return NetworkActions::Actions[index].Name;
} else {
return STR_NONE;
}
}
int network_can_perform_action(unsigned int groupindex, unsigned int index)