GP-0: Fixed silly SleighAssembler bug

This commit is contained in:
Dan 2021-04-08 15:33:35 -04:00
parent 156da37e3f
commit 9f54b92325

View file

@ -107,6 +107,9 @@ public class SleighAssembler implements Assembler {
@Override
public InstructionIterator patchProgram(byte[] insbytes, Address at)
throws MemoryAccessException {
if (insbytes.length == 0) {
return listing.getInstructions(new AddressSet(), true);
}
Address end = at.add(insbytes.length - 1);
listing.clearCodeUnits(at, end, false);
memory.setBytes(at, insbytes);