PapyrusDotNet icon indicating copy to clipboard operation
PapyrusDotNet copied to clipboard

[Clr2Papyrus] Possibly wrong invoke method used for delegates

Open zerratar opened this issue 10 years ago • 0 comments

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();

zerratar avatar Dec 26 '15 09:12 zerratar