Page 1 of 1

[0.9.8] 4.3 billion mineable resources (but not really)

Posted: Tue May 13, 2014 5:30 pm
by albarak
Seems like there's an integer overflow happening somewhere:

Image

When I demolish the miner and check the squares underneath by hand, two of them show negative values. Mining makes the negative value greater (i.e. -2500 ==> -2501). There are also at least two in the copper field in the north west end of the base in this save (let me know when you've grabbed it so I can pull the link, tia); I can't remember if I've seen this in any other levels or in freeplay. e/ I should clarify, this is level 4 of New Hope.

Probably somewhat related to this one, even if it's not the same code block causing it.

Re: [0.9.8] 4.3 billion mineable resources (but not really)

Posted: Tue May 13, 2014 10:47 pm
by ssilk
I guess they will need a save of that game....

Re: [0.9.8] 4.3 billion mineable resources (but not really)

Posted: Wed May 14, 2014 12:22 pm
by albarak
Is the link not showing up? I tried attaching it but the file was too big, had to use a dropbox link instead.

Re: [0.9.8] 4.3 billion mineable resources (but not really)

Posted: Wed May 14, 2014 5:53 pm
by ssilk
Ah. Now. Sorry. I think Albert needs to enhance the links a bit more... :)

Re: [0.9.8] 4.3 billion mineable resources (but not really)

Posted: Fri May 16, 2014 3:00 pm
by slpwnd
Thanks for the report. There is a resource with 0 amount in the map. In 0.10 there will be a safety measure in the entity mining code against this.