Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

foreach遍历包含枚举的容器会报错 #87

Closed
JourneyHans opened this issue Mar 17, 2020 · 2 comments
Closed

foreach遍历包含枚举的容器会报错 #87

JourneyHans opened this issue Mar 17, 2020 · 2 comments

Comments

@JourneyHans
Copy link
Contributor

原代码:
image

补丁代码:
image

报错内容:
NullReferenceException: Object reference not set to an instance of an object
IFix.Core.VirtualMachine.Execute (IFix.Core.Instruction* pc, IFix.Core.Value* argumentBase, System.Object[] managedStack, IFix.Core.Value* evaluationStackBase, System.Int32 argsCount, System.Int32 methodIndex, System.Int32 refCount, IFix.Core.Value** topWriteBack) (at <50088b4179be4e2181127c2aa43ddb16>:0)
IFix.Core.VirtualMachine.Execute (System.Int32 methodIndex, IFix.Core.Call& call, System.Int32 argsCount, System.Int32 refCount) (at <50088b4179be4e2181127c2aa43ddb16>:0)
IFix.ILFixDynamicMethodWrapper.__Gen_Wrap_8 (System.Object P0) (at <8cf0071284ca444aa653f86e4113e63e>:0)
EnumParse.PrintEnum () (at <8cf0071284ca444aa653f86e4113e63e>:0)
FixTestPanel.OnEnumParseFixCall () (at <8cf0071284ca444aa653f86e4113e63e>:0)

@JourneyHans
Copy link
Contributor Author

foreach里面不需要任何操作,单纯遍历一下就会报错。目前解决办法是改为普通for循环。

@JourneyHans
Copy link
Contributor Author

感谢,最新版测试后修复了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant