If setting the value of a signal to > 2147483647 or < -2147483647 it creates a buffer overflow. If this is due to the limitations that where put in place because of 32 bit clients in multiplayer worlds it would still be helpful to at least limit the range of numbers entered into the field to prevent confusion.
Edit: i just noticed that this is not a limitation to only constant combinators but to the entire circuit system. I chained several arithmetic combinators together of which each multiplied the signal by 1000 and it does the same thing.
[Twinsen] [0.15.13] Buffer overflow in constant combinators
-
- Inserter
- Posts: 24
- Joined: Mon Jan 26, 2015 3:32 pm
- Contact:
Re: [0.15.13] Buffer overflow in constant combinators
Combinators have always been based on signed 32 bit ints afaik. This behavior has even been (ab)used in the past for some interesting effects. See: https://www.reddit.com/r/factorio/comme ... erflow_in/
Funnily enough the two uses documented there are no longer needed, but if they were made 64 bit then they would still overflow just with bigger numbers.
Funnily enough the two uses documented there are no longer needed, but if they were made 64 bit then they would still overflow just with bigger numbers.
-
- Inserter
- Posts: 24
- Joined: Mon Jan 26, 2015 3:32 pm
- Contact:
Re: [0.15.13] Buffer overflow in constant combinators
Of course they would overflow at some point but not nearly as early as now. We have stuff like accumulators that hold dozens of GJ of energy but you cannot put that number into the circuit network. The least should be, that when entering numbers in the constant combinator it should prevent you from making any input that would overflow.MrGrim wrote:Combinators have always been based on signed 32 bit ints afaik. This behavior has even been (ab)used in the past for some interesting effects. See: https://www.reddit.com/r/factorio/comme ... erflow_in/
Funnily enough the two uses documented there are no longer needed, but if they were made 64 bit then they would still overflow just with bigger numbers.
Re: [Twinsen] [0.15.13] Buffer overflow in constant combinators
The entire circuit network uses 32 bit signals and works by design like this. I see no point in switching to 64 bit. If anything, the 32bit limitation adds to the fun.
As for the GUI problem, It can even be seen as a feature. When pasting large numbers most of the times it's useful to cut the extra bits instead of clamping to the largest number.
As for the GUI problem, It can even be seen as a feature. When pasting large numbers most of the times it's useful to cut the extra bits instead of clamping to the largest number.
-
- Inserter
- Posts: 24
- Joined: Mon Jan 26, 2015 3:32 pm
- Contact:
Re: [Twinsen] [0.15.13] Buffer overflow in constant combinators
10/10 would buy again.Twinsen wrote:It's not a bug, it's a feature!