Skip to content

Commit

Permalink
Fix crash when confirming signal with "E"
Browse files Browse the repository at this point in the history
Would happen in certain circumstances when picking a new signal for a
slot that has previously had a signal.

Reported in:
https://mods.factorio.com/mod/cybersyn-combinator/discussion/67515fb722fc1663076c8322
  • Loading branch information
Sharparam committed Dec 5, 2024
1 parent bd9bfc8 commit 5b2ac34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---------------------------------------------------------------------------------------------------
Version: 2.4.0
Date: 2024-12-04
Date: 2024-12-05
Major Features:
- Support for logistic sections and groups.
Features:
- Show circuit network connection info in GUI.
Optimizations:
- Better detection of existing signals/sections when copy-pasting.
Bugfixes:
- Fix pressing confirm button (default "E") while signal picker dialog is open causing a crash
under certain circumstances.
Gui:
- Make UI more consistent with base game UI by only allowing left click on some UI elements.
---------------------------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/scripts/gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ local function confirm_signal_value(player_index, state, clear_selected)
local slot_button = state.selected_slot_button
if slot_button and slot_button.valid then slot_button.style = "flib_slot_button_default" end
local current = state.combinator:get_item_slot(state.selected_section_index, state.selected_slot)
if not current.signal or not current.signal.name then return end
local value = resolve_textfield_number(state.signal_value_items, player_index, current.count or 0)
if not value then
state.signal_value_confirm.enabled = false
Expand Down

0 comments on commit 5b2ac34

Please sign in to comment.