Skip to content

Commit

Permalink
Don't assert for unexpected FX slot IDs
Browse files Browse the repository at this point in the history
Although they should never happen at this point and would indicate a serious
problem, there's no need to kill the process instead of returning a dummy value
(and the assert wouldn't check in release builds anyway).
  • Loading branch information
kcat committed Sep 2, 2024
1 parent 71d341c commit a4e126a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion al/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4015,7 +4015,9 @@ void ALsource::eax4_translate(const Eax4Props& src, Eax5Props& dst) noexcept
return EAXPROPERTYID_EAX50_FXSlot2;
if(src_id == EAXPROPERTYID_EAX40_FXSlot3)
return EAXPROPERTYID_EAX50_FXSlot3;
assert(false && "Unknown active FX slot ID.");

UNLIKELY
ERR("Unexpected active FX slot ID\n");
return EAX_NULL_GUID;
};
const auto src_slots = al::span{src.active_fx_slots.guidActiveFXSlots};
Expand Down

0 comments on commit a4e126a

Please sign in to comment.