Skip to content

Commit

Permalink
Merge pull request #607 from Morilli/fix-compiler-warning
Browse files Browse the repository at this point in the history
Fix potential compiler warning on questionable code path
  • Loading branch information
LIJI32 authored Apr 13, 2024
2 parents bd31258 + c5b3e47 commit 5d06f45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/gb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ static void GB_reset_internal(GB_gameboy_t *gb, bool quick)
GB_update_clock_rate(gb);
uint8_t rtc_section[GB_SECTION_SIZE(rtc)];
memcpy(rtc_section, GB_GET_SECTION(gb, rtc), sizeof(rtc_section));
memset(gb, 0, (size_t)GB_GET_SECTION((GB_gameboy_t *) 0, unsaved));
memset(gb, 0, GB_SECTION_OFFSET(unsaved));
memcpy(GB_GET_SECTION(gb, rtc), rtc_section, sizeof(rtc_section));
gb->model = model;
gb->version = GB_STRUCT_VERSION;
Expand Down

0 comments on commit 5d06f45

Please sign in to comment.