Skip to content

关于鼠标移动时候的System.OverflowException异常,已解决 #34

Description

@Isaac320

我找了下源码,看到有一处类型转换会报这种异常
在STNodeEditor.cs类的第634行
Point pt = new Point(((int)m.LParam) >> 16, (ushort)m.LParam);
这里的强制转换会报算术运算溢出
改成下面这样写就兼容了
int x = (short)((m.LParam.ToInt64() >> 16) & 0xFFFF);
int y = (short)(m.LParam.ToInt64() & 0xFFFF);
Point pt = new Point(x, y);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions