Elite Diviner
- Joined
- Jul 13, 2008
- Messages
- 419
- Reaction score
- 217
just wondering why are you using long and not just stick to an int?
well done flav. Even though thats fixed by most unstupid coders.
I bet he fixed it earlier. He just now released it boy
This made me giggle. Careful what you say, The almighty eye is watching.
OT: Thanks Flav, Nice Release.
---------- Post added at 06:15 PM ---------- Previous post was at 06:14 PM ----------
lolwut?
just wondering why are you using long and not just stick to an int?
Most meso exploits have something to do with overflow.
I never tried but Lai says it's not. I prefer the converting to long method, though it wastes 4 bytes.
But you have to multiply the price with the quantity before you check for the price being >= 0.
just wondering why are you using long and not just stick to an int?
@flav Honestly, its smarter to use a long that way its guaranteed that the int won't become negative.
@mertjuh Using an integer defeats the entire purpose of this fix. What usually happens when you exceed (2^31 -1) the integer value becomes negative. However using a long expands the capacity of the value making the cap (2^63 -1). Besides, not many arithmetic operations can exceed (2^63 -1) unless your doing the very thing.
if (price * quantity < 0)
if (((long) price * quantity > Integer.Max_Value)