From 332fb8430b5f50b0f25b806c1d5e3a74dac55eec Mon Sep 17 00:00:00 2001 From: Zithia Satazaki Date: Mon, 30 Oct 2023 15:11:15 -0400 Subject: [PATCH] avoid returnless fallthrough --- source/game/scripting/StarLuaGameConverters.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/game/scripting/StarLuaGameConverters.cpp b/source/game/scripting/StarLuaGameConverters.cpp index c65eb83..94ac14b 100644 --- a/source/game/scripting/StarLuaGameConverters.cpp +++ b/source/game/scripting/StarLuaGameConverters.cpp @@ -15,6 +15,7 @@ LuaValue LuaConverter::from(LuaEngine& engine, InventorySlot k) { return engine.createString("swap"); else if (k.is()) return engine.createString("trash"); + else return {}; // avoid UB if every accounted-for case fails } Maybe LuaConverter::to(LuaEngine&, LuaValue const& v) {