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

修正为空类对象可正常调用类成员函数,导致报错信息容易引起错误的理解的bug #335

Merged
merged 2 commits into from
Jun 9, 2020

Conversation

NewbieGameCoder
Copy link
Contributor

No description provided.

/// 为确保性能,暂时先确保开发的时候,安全检查完备。
/// 当然手机端运行时可能会出现为空的类对象可正常调用成员函数,导致成员函数里面访问成员变量报错时可能使得根据Log跟踪BUG时方向错误。
#if DEBUG && !DISABLE_ILRUNTIME_DEBUG
var thisObj = mStack[arg->Value];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里直接取arg->Value可能会出现数组越界的报错,正确的做法应该是用ResolveObject(arg)来获取,arg有可能不是Object类型,直接取Value会出问题

@liiir1985 liiir1985 merged commit c468cab into Ourpalm:master Jun 9, 2020
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

Successfully merging this pull request may close these issues.

3 participants