mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 13:48:56 +00:00
HW/CEXIIPL: Consider that the loaded file may not actually contain a nullterminated string.
This commit is contained in:
parent
7d53916466
commit
57e166dbef
1 changed files with 3 additions and 2 deletions
|
@ -111,8 +111,9 @@ CEXIIPL::CEXIIPL(Core::System& system) : IEXIDevice(system)
|
||||||
{
|
{
|
||||||
// Descramble the encrypted section (contains BS1 and BS2)
|
// Descramble the encrypted section (contains BS1 and BS2)
|
||||||
Descrambler(&m_rom[0x100], 0x1afe00);
|
Descrambler(&m_rom[0x100], 0x1afe00);
|
||||||
// yay for null-terminated strings
|
|
||||||
const std::string_view name{reinterpret_cast<char*>(m_rom.get())};
|
const std::string_view name{reinterpret_cast<char*>(m_rom.get()),
|
||||||
|
strnlen(reinterpret_cast<char*>(m_rom.get()), 0x100)};
|
||||||
INFO_LOG_FMT(BOOT, "Loaded bootrom: {}", name);
|
INFO_LOG_FMT(BOOT, "Loaded bootrom: {}", name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue