Mod version
Modern Bulk Rail Loaders: Pooled 0.1.0
Factorio version
2.0.77
Steps to reproduce
- Place a Bulk Rail Loader.
- Open its GUI.
- Click directly on the
Wagons: 5 text label in the upper-left section of the GUI.
- The mod crashes immediately.
The crash does not occur by clicking the + or - buttons. It occurs when clicking the Wagons: 5 label itself.
Expected behavior
Clicking the text label should either do nothing or be ignored.
Actual behavior
The mod crashes with the following error:
Error while running event modern-bulk-rail-loader-pooled::on_gui_click (ID 1)
__modern-bulk-rail-loader-pooled__/control.lua:317: 'for' limit must be a number
stack traceback:
__modern-bulk-rail-loader-pooled__/control.lua:317: in function 'wagon_offsets'
__modern-bulk-rail-loader-pooled__/control.lua:392: in function 'rebuild_silos'
__modern-bulk-rail-loader-pooled__/control.lua:568: in function <__modern-bulk-rail-loader-pooled__/control.lua:556>
It appears that the click event for the wagon count label is being handled as though it were one of the wagon count controls, resulting in a non-numeric value being passed to wagon_offsets().