Skip to content

Commit

Permalink
Fix size calculation, MacOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
rfomin committed Jan 30, 2025
1 parent 0508dbc commit 82c0e66
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions prboom2/src/p_saveg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,7 @@ void P_UnArchiveThinkers(void) {
tc == tc_quake ? sizeof(quake_t) :
tc == tc_ambient_source ? sizeof(ambient_source_t) :
tc == tc_mobj ? sizeof(mobj_t) :
tc == tc_button ? sizeof(button_t) :
0;
}

Expand Down Expand Up @@ -1660,10 +1661,12 @@ void P_UnArchiveThinkers(void) {
}

case tc_button:
button_t button;
P_LOAD_SIZE(&button, sizeof(button_t));
P_StartButton(button.line, button.where, button.btexture, button.btimer);
break;
{
button_t button;
P_LOAD_SIZE(&button, sizeof(button_t));
P_StartButton(button.line, button.where, button.btexture, button.btimer);
break;
}

default:
I_Error("P_UnarchiveSpecials: Unknown tc %i in extraction", tc);
Expand Down

0 comments on commit 82c0e66

Please # to comment.