Skip to content

Commit

Permalink
Fix svcbreak detection
Browse files Browse the repository at this point in the history
  • Loading branch information
TuxSH committed Aug 9, 2023
1 parent 41eccac commit 37572f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion k11_extension/source/fatalExceptionHandlersMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void fatalExceptionHandlersMain(u32 *registerDump, u32 type, u32 cpuId)
registerDump[15] = pc;

//Dump code
u8 *instr = (u8 *)pc + ((cpsr & 0x20) ? 2 : 4) - (dumpHeader.codeDumpSize >> 1) ; //wouldn't work well on 32-bit Thumb instructions, but it isn't much of a problem
u8 *instr = (u8 *)pc + ((cpsr & 0x20) ? 2 : 4) - dumpHeader.codeDumpSize; //wouldn't work well on 32-bit Thumb instructions, but it isn't much of a problem
dumpHeader.codeDumpSize = ((u32)instr & (((cpsr & 0x20) != 0) ? 1 : 3)) != 0 ? 0 : safecpy(codeDump, instr, dumpHeader.codeDumpSize);

//Copy register dump and code dump
Expand Down

0 comments on commit 37572f3

Please sign in to comment.