mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
network_receive_save_set_flag sanity checks (#24)
This commit is contained in:
parent
90b071acc0
commit
3826d379e9
1 changed files with 2 additions and 2 deletions
|
@ -29,12 +29,12 @@ void network_receive_save_set_flag(struct Packet* p) {
|
|||
packet_read(p, &flags, sizeof(u32));
|
||||
packet_read(p, &backupSlot, sizeof(u8));
|
||||
|
||||
if (fileIndex >= NUM_SAVE_FILES) {
|
||||
if (fileIndex < 0 || fileIndex >= NUM_SAVE_FILES) {
|
||||
LOG_ERROR("Invalid fileIndex: %d", fileIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
if (courseIndex >= COURSE_COUNT) {
|
||||
if (courseIndex < 0 || courseIndex >= COURSE_COUNT) {
|
||||
LOG_ERROR("Invalid courseIndex: %d", courseIndex);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue