Skip to content

Commit

Permalink
Fix fallback title
Browse files Browse the repository at this point in the history
std::strings aren't null-terminated.
  • Loading branch information
Daft-Freak authored Dec 19, 2020
1 parent 376fb31 commit 4e7e6d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/firmware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ void scan_flash() {
} else {
// fallback "title"
game.title.resize(20);
snprintf(game.title.data(), 20, "game@%i", int(game.offset / qspi_flash_sector_size));
game.title.resize(snprintf(game.title.data(), 20, "game@%i", int(game.offset / qspi_flash_sector_size)));
}

game_list.push_back(game);
Expand Down

0 comments on commit 4e7e6d5

Please sign in to comment.