Skip to content

Commit

Permalink
Ignoring unsupported commands when loading opcodes database.
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDMC committed Apr 20, 2024
1 parent 352f25c commit 75be7bc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/OpcodeInfoDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ bool OpcodeInfoDatabase::_Load(const std::string filepath)
continue; // invalid command
}

auto attributes = c["attrs"];
if (attributes.JSONType() == JSON::Class::Object)
{
auto unsupported = attributes["is_unsupported"];
if (unsupported.JSONType() == JSON::Class::Boolean && unsupported.ToBool())
{
continue; // command defined as unsupported
}
}

auto idLong = stoul(commandId.ToString(), nullptr, 16);
if (idLong > 0x7FFF)
{
Expand Down

0 comments on commit 75be7bc

Please sign in to comment.