It keeps saying
Cannot implicitly convert type 'long' to 'int'. An explicit conversion exists (are you missing a cast?)
int lVar10 = 0x7a69;
int uVar12 = lVar10 * 0x1a3 + 0x181d;
lVar10 = uVar12 + ((uVar12 & 0xffffffff) / 0x7262) * -0x7262;
In short, the numbers you are trying to operate are bigger than the highest possible int value, specifically at the row
lVar10 = uVar12 + ((uVar12 & 0xffffffff) / 0x7262) * -0x7262;
In decimal that number is 2147483647 = 2^31 - 1. Since you are using hexa to represent numbers (with the prefix 0x), the 0xffffffff alone is already bigger than the highest integer.
So you could fix this by declaring lVar10 and lVar12 as long.
You should cast the variables to a long. Adding (long) after the = in the third line should solve it.
Edit:
Also, you could just declare the variable lVar10 and uVar12 as long in the first place.
You are trying to store a non-integer into an integer variable.
The variable named lVar10
can be assigned integers. For example, values like -3
, -2
, -1
, 0
, 1
, 2
, 3
.
User contributions licensed under CC BY-SA 3.0