[kovarex] [2.0.9] parameter formulas that evaluate to a negative value always result in INT_MAX

This subforum contains all the issues which we already resolved.
Dreglor
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Oct 22, 2024 5:50 pm
Contact:

[kovarex] [2.0.9] parameter formulas that evaluate to a negative value always result in INT_MAX

Post by Dreglor »

I am seeing some unexpected behavior in the new parametrization feature where any parameter formula that would result in a negative value is always evaluated to INT_MAX (2147483647)

for reproduction I've created a simple blueprint that demonstrates the bug. the value is just the negated stack size but this also fails with constant expressions:

Code: Select all

0eNp9Um1PgzAQ/i/30RTD5liExL/hF2NIGTdtAm1tr4vLwn/3KUymMZEPpHe95+UeuFA3JPbBWKHmQubgbKTm5ULRvFk95J7VI1NDOhh5H1nMoTi4sTNWiws0KTK2509qNtOrIrZixPBCMRfn1qax44AB9T+VIu8i0M5mVTAW1eN9peiM02ZXQgnmJLih7fhdnwwgmLtxtbjuZ3zMF0cTorR/1vA64CAcijKbj5xRGRpF5wy2ZanIeQ56cUJ3MOaS+PSTTM4+k51MkITOutkyUTzThAd5rGpLIleY6YHA67cbRR/gQmLFukiWujYxbF0YZzGEloE5tIaeoKVW6mvY6vvQEBZCeQQ2DRp14cs2otOzZ3y5vLOExNmtER4xcfsjFJ1gfTZS7bf1rq6rh3pX7cvNNH0Bd27Bug==
I swear I didn't plan the end of the string to read as "Bug"
TheToric
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Mar 06, 2016 11:52 pm
Contact:

Re: [2.0.9] parameter formulas that evaluate to a negative value always result in INT_MAX

Post by TheToric »

Can confirm, ran into this when trying to paramatarize a dropoff train station.
mooman219
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Apr 10, 2020 10:28 pm
Contact:

Re: [kovarex] [2.0.9] parameter formulas that evaluate to a negative value always result in INT_MAX

Post by mooman219 »

Same issue. I checked to see if it was documented to only work on positive numbers but I didn't see that anywhere. I can work around it by just negating the formula result in a combinator, but it feels strange to need to do this.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [2.0.9] parameter formulas that evaluate to a negative value always result in INT_MAX

Post by kovarex »

Hello, this seems like the same issue as this: 116342
I fixed it for 2.0.12
Post Reply

Return to “Resolved Problems and Bugs”