Post subject: Maximum value ?
Lil_Gecko
He/Him
Player (94)
Joined: 4/7/2011
Posts: 520
Let's say I have an adress. The current value is 18. Is there a possibility, via disassembly or whatever, to know what the maximum value of this adress is ? Like, for exemple, it can go up to 22, so I know I won't settle for 18. Thanks.
Joined: 10/31/2006
Posts: 134
No, anything you could find via source code/dissasembly would be a soft cap aka: "if Speed is higher then 22, make it 22" but that doesn't count for other way to increase that number via bug/memory corruption/oversight. Usually adresses are 1 byte, so the cap is 255 before reverting back to 0.
Editor, Skilled player (1404)
Joined: 3/31/2010
Posts: 2086
Is it even possible to reason over the state of a variable over the course of the execution of a program P? To me, this sounds like well in the realm of undecidability. Anyhow, your best bet is to figure it out by observation, either by going over the disassembly with your eyes or by looking at the value during runtime. I don't think there's any shortcuts for it.