Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Feb 9, 2025
1 parent c1c982b commit 7c516f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion platforms/shared/desktop/gui_debug_disassembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ static void add_bookmark_popup(void)
static bool bookmark_modified = false;
u16 bookmark_address = (u16)selected_address;

if (!bookmark_modified && bookmark_address >= 0)
if (!bookmark_modified && selected_address >= 0)
snprintf(address_bookmark, 5, "%04X", bookmark_address);

ImGui::Text("Name:");
Expand Down
2 changes: 1 addition & 1 deletion platforms/shared/desktop/gui_debug_memeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ void MemEditor::SearchWindow()
ImGui::TableHeadersRow();

ImGuiListClipper clipper;
clipper.Begin(m_search_results.size());
clipper.Begin((int)m_search_results.size());

while (clipper.Step())
{
Expand Down
2 changes: 1 addition & 1 deletion src/geargrafx_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ bool GeargrafxCore::SaveState(std::ostream& stream, size_t& size, bool screensho
header.magic = GG_SAVESTATE_MAGIC;
header.version = GG_SAVESTATE_VERSION;
header.timestamp = time(NULL);
strncpy(header.rom_name, m_cartridge->GetFileName(), sizeof(header.rom_name));
strncpy(header.rom_name, m_cartridge->GetFileName(), sizeof(header.rom_name) - 1);
header.rom_crc = m_cartridge->GetCRC();

Debug("Save state header magic: 0x%08x", header.magic);
Expand Down

0 comments on commit 7c516f4

Please sign in to comment.