mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Possible fix for packet_level_macro crash
This commit is contained in:
parent
7013443003
commit
21343194ff
1 changed files with 8 additions and 0 deletions
|
@ -140,6 +140,14 @@ void network_receive_level_macro(struct Packet* p) {
|
|||
|
||||
u8 thisAreaIndex;
|
||||
packet_read(p, &thisAreaIndex, sizeof(u8));
|
||||
if (thisAreaIndex >= 8) {
|
||||
LOG_ERROR("Receiving 'location response' with invalid areaIndex!");
|
||||
return;
|
||||
}
|
||||
if (gAreaData[thisAreaIndex].macroObjects == NULL) {
|
||||
LOG_ERROR("Receiving 'location response' with invalid macroObjects!");
|
||||
return;
|
||||
}
|
||||
|
||||
// read and execute macro deletions
|
||||
u8 macroDeletionCount;
|
||||
|
|
Loading…
Reference in a new issue