PapyrusDotNet
PapyrusDotNet copied to clipboard
[Clr2Papyrus] Possibly wrong invoke method used for delegates
Whenever a nested delegate is used, it is required to find the method reference by going to the previous ldsfldn (load method ref pointer)
If you have a non-nested delegate right after this one may take the nested ones invoke instead of its own.
Solution: Never use the same reference more than once. If no ldsfldn is found then the appointed method name should be used instead.
Note: Having more than one delegate nested in each other has not been tested: Ex:
DelegateA a => { DelegateB b => { . DelegateC c => {}; . c(); . } . b(); }; A();