mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
HW/CEXIIPL: Check for errors when reading font.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user