Skip to content

Commit

Permalink
Merge pull request #3411 from pmatos/AccessNullptr
Browse files Browse the repository at this point in the history
Clean up access to possible nullptr
  • Loading branch information
Sonicadvance1 committed Feb 6, 2024
2 parents 5e5984a + fa8bcfd commit cdcc432
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ void OpDispatchBuilder::SyscallOp(OpcodeArgs) {
auto NewRIP = GetRelocatedPC(Op, -Op->InstSize);
_StoreContext(GPRSize, GPRClass, NewRIP, offsetof(FEXCore::Core::CPUState, rip));

const auto& GPRIndicesRef = *GPRIndexes;

OrderedNode *Arguments[SyscallArgs] {
InvalidNode,
InvalidNode,
Expand All @@ -124,7 +122,7 @@ void OpDispatchBuilder::SyscallOp(OpcodeArgs) {
InvalidNode,
};
for (size_t i = 0; i < NumArguments; ++i) {
Arguments[i] = LoadGPRRegister(GPRIndicesRef[i]);
Arguments[i] = LoadGPRRegister(GPRIndexes->at(i));
}

if (IsSyscallInst) {
Expand Down

0 comments on commit cdcc432

Please sign in to comment.