GTA V $ 2,147,483,647 Glitch Could Wipe Your Cash Away

Andrew_C

New member
Mar 1, 2011
460
0
0
arc1991 said:
NLS said:
Why are people surprised? 2,147,483,647 is the highest you can go with a signed integer.
Hell they could almost try to make that a selling point for the next-gen version of GTAV "Now with support for a maximum amount of 9,223,372,036,854,775,807 $" since that's how high you can go with 64bit.

People will always say "oh why didn't they think of that", but did you know that a lot of computer clocks and systems will have major problems when time hits 19 January 2038 because of the exact same problem?
I'm no expert in binary department...but why will computer clocks and systems have major problems o_O it's just a number, 19/01/2038...

Brain. Hurts.
He is thinking of the UNIX Millennium. Unix systems used to use a signed 32bit INT to store the number of seconds since some time in 1970, which is how UNIX systems and its derivatives like BSD, Mac OSX and GNU/Linux tell time internally (for arbitrary reasons that made sense to stoned computer researchers in 1970).

It's not that big an issue, as all major Unix implementations and derivatives already have moved (or about to move) to a 64 bit INT. And if you are still running legacy systems that require a 32bit INT in 2038 then you have bigger problems than that.

It doesn't affect Windows systems, although Windows has had it's share of time issues and integer overflows in the past due to sloppy coding and bad design.
 

TechNoFear

New member
Mar 22, 2009
446
0
0
frobalt said:
I understand how this sort of error could be put in the code, but it's not even close to being a new error within the gaming world, so someone should have figured out a way to prevent it by now.
New coders have grown up coding in managed (safe) languages with IDEs that do nag you about every little thing.

When they write in lower level languages (ie C/C++ where the IDE happily lets you crash your PC) they get caught by these type of bugs (especially in multi threaded, time critical, event driven software).

BTW In your code 'if (currentCash < maximumCash)' should be 'if (newValue < maximumCash)'

If not your code does nothing to protect the data and will prevent the system correcting an error (heal the data)...

frobalt said:
Cash is likely a global variable somewhere.
It would be an object orientated language and the data would be encapsulated (or absoulutely not a global variable).
 
Mar 19, 2010
193
0
0
thiosk said:
I keep telling people that cookie clikcer [https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CC4QFjAA&url=http%3A%2F%2Forteil.dashnet.org%2Fcookieclicker%2F&ei=lfpKUvCWHPKgyAH-_YCADQ&usg=AFQjCNGg5L6LX4KNcMQQBn-_0C5CirMvmg&sig2=_Dp_UQxVX6Zb14-Nfygyaw&bvm=bv.53371865,d.aWc] is better.

Now you'll believe me.

It can handle trillions.

Millions of trillions.
LOL exactly what i thought after reading the article.