mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-21 03:54:57 +00:00
HW/CEXIIPL: Check for errors when reading font.
This commit is contained in:
parent
57e166dbef
commit
8194b53166
1 changed files with 5 additions and 2 deletions
|
@ -240,8 +240,11 @@ void CEXIIPL::LoadFontFile(const std::string& filename, u32 offset)
|
|||
INFO_LOG_FMT(BOOT, "Found IPL dump, loading {} font from {}",
|
||||
(offset == 0x1aff00) ? "Shift JIS" : "Windows-1252", ipl_rom_path);
|
||||
|
||||
stream.Seek(offset, File::SeekOrigin::Begin);
|
||||
stream.ReadBytes(&m_rom[offset], fontsize);
|
||||
if (!stream.Seek(offset, File::SeekOrigin::Begin) || !stream.ReadBytes(&m_rom[offset], fontsize))
|
||||
{
|
||||
WARN_LOG_FMT(BOOT, "Failed to read font from IPL dump.");
|
||||
return;
|
||||
}
|
||||
|
||||
m_fonts_loaded = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue