Page 1 of 1

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

Posted: Tue Oct 22, 2024 7:12 pm
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"

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

Posted: Wed Oct 23, 2024 11:03 am
by TheToric
Can confirm, ran into this when trying to paramatarize a dropoff train station.

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

Posted: Wed Oct 23, 2024 11:23 pm
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.

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

Posted: Sat Oct 26, 2024 11:09 am
by kovarex
Hello, this seems like the same issue as this: 116342
I fixed it for 2.0.12