Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Center mouse click crashes applications on some PCs with an Arithmetic Overflow Exception #2715
What steps will reproduce this issue?
This issue has occurred on several of our customer PCs when running our application as a 64-bit process. I cannot personally reproduce the issue, but the customers have verified the fix below resolved the problem for them.
An arithmetic overflow exception occurs, and the stack trace indicates the problem stemming from the Utilities.cs file, specifically the GET_X_LPARAM and GET_Y_LPARAM methods.
We have changed the methods to read as follows:
We have also added an overload to each of HIWORD and LOWORD to accommodate the long parameter.