mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GP-0: Fixed silly SleighAssembler bug
This commit is contained in:
parent
156da37e3f
commit
9f54b92325
1 changed files with 3 additions and 0 deletions
|
@ -107,6 +107,9 @@ public class SleighAssembler implements Assembler {
|
||||||
@Override
|
@Override
|
||||||
public InstructionIterator patchProgram(byte[] insbytes, Address at)
|
public InstructionIterator patchProgram(byte[] insbytes, Address at)
|
||||||
throws MemoryAccessException {
|
throws MemoryAccessException {
|
||||||
|
if (insbytes.length == 0) {
|
||||||
|
return listing.getInstructions(new AddressSet(), true);
|
||||||
|
}
|
||||||
Address end = at.add(insbytes.length - 1);
|
Address end = at.add(insbytes.length - 1);
|
||||||
listing.clearCodeUnits(at, end, false);
|
listing.clearCodeUnits(at, end, false);
|
||||||
memory.setBytes(at, insbytes);
|
memory.setBytes(at, insbytes);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue