mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-04 08:35:55 +00:00
DSPDisassembler: fail when buffer too large
This commit is contained in:
parent
1d0185d7d5
commit
7dab92d8b5
1 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,12 @@ DSPDisassembler::DSPDisassembler(const AssemblerSettings& settings) : settings_(
|
|||
|
||||
bool DSPDisassembler::Disassemble(const std::vector<u16>& code, std::string& text)
|
||||
{
|
||||
if (code.size() > std::numeric_limits<u16>::max())
|
||||
{
|
||||
text.append("; code too large for 16-bit addressing\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
for (u16 pc = 0; pc < code.size();)
|
||||
{
|
||||
if (!DisassembleOpcode(code.data(), &pc, text))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue