ioncodes / dnpatch

.NET Patcher library using dnlib
MIT License
313 stars 49 forks source link

Fix exception handlers. #40

Closed DenJur closed 6 years ago

DenJur commented 7 years ago

Fix exception handlers not being cleared when method body is.

SlowLogicBoy commented 7 years ago

Body = new CilBody(); Wouldn't this be easier? Just in case there are other stuff that needs to be cleared? At least I clear body and create new one like this, haven't had problems with this method.

ioncodes commented 7 years ago

I will have a look into both methods

DenJur commented 7 years ago

I think new CilBody will also clear MaxStack which breaks KeepMaxStack. Does it not?

SlowLogicBoy commented 7 years ago

Yes it does.

ioncodes commented 6 years ago

I implemented both versions. See commit 1436d418e49cf527c3b81a0667e99cb327110eba