-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
VerificationException: Error in XLuaTest.TestHotfix:XLuaTest.TestHotfix:.ctor (int,int,long) Invalid instruction target fffffff5
测试代码如下,Hotfix之后,newTestHotfix对象,必定出现,经调试发现,特定指令长度下必出现,
构造函数在Hotfix之后,需要对指令重新计算下偏移再进行长度处理
在此行数上重新计算下指令偏移量,即可修复,

InstructionHelp.txt
[Hotfix]
public class TestHotfix
{
static int Test(int type)
{
return 0;
}
int index = 0;
int currencyType = 0;
int currencyConfigLO = 0;
public TestHotfix(int type, int code, long amount)
{
currencyType = code;
switch (currencyType)
{
case 0:
currencyConfigLO = Test(1);
break;
case 1:
currencyConfigLO = Test(2);
break;
case 2:
currencyConfigLO = Test(3);
break;
case 3:
currencyConfigLO = Test(4);
break;
case 4:
currencyConfigLO = Test(5);
break;
case 5:
currencyConfigLO = Test(9);
break;
case 6:
currencyConfigLO = Test(7);
break;
case 7:
currencyConfigLO = Test(10);
break;
case 8:
currencyConfigLO = Test(11);
break;
default:
break;
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels