mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 21:45:12 +00:00
Bounds check network_receive_level_spawn_info()
This commit is contained in:
parent
36e9274ef5
commit
74ea705f8b
1 changed files with 4 additions and 0 deletions
|
@ -107,6 +107,10 @@ void network_receive_level_spawn_info(struct Packet* p) {
|
||||||
packet_read(p, &spawnInfoDeletionCount, sizeof(u8));
|
packet_read(p, &spawnInfoDeletionCount, sizeof(u8));
|
||||||
LOG_INFO("rx spawn info (count %d)", spawnInfoDeletionCount);
|
LOG_INFO("rx spawn info (count %d)", spawnInfoDeletionCount);
|
||||||
if (spawnInfoDeletionCount <= 0) { return; }
|
if (spawnInfoDeletionCount <= 0) { return; }
|
||||||
|
if (thisAreaIndex >= MAX_AREAS) {
|
||||||
|
LOG_ERROR("Receiving 'location response' with invalid areaIndex!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct SpawnInfo* spawnInfo = gAreaData[thisAreaIndex].objectSpawnInfos;
|
struct SpawnInfo* spawnInfo = gAreaData[thisAreaIndex].objectSpawnInfos;
|
||||||
u16 spawnInfoIndex = 0;
|
u16 spawnInfoIndex = 0;
|
||||||
|
|
Loading…
Reference in a new issue