Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/scripting/StarLuaGameConverters.cpp
diff options
context:
space:
mode:
authorZithia Satazaki <qmanxt@gmail.com>2023-10-30 15:11:15 -0400
committerZithia Satazaki <qmanxt@gmail.com>2023-10-30 15:11:15 -0400
commit332fb8430b5f50b0f25b806c1d5e3a74dac55eec (patch)
treed87463f4b98dfa05363b14bf9eb98784322a19b4 /source/game/scripting/StarLuaGameConverters.cpp
parent86f02eab9b12a766f5f3f7ee6c18c96422779b46 (diff)
avoid returnless fallthrough
Diffstat (limited to 'source/game/scripting/StarLuaGameConverters.cpp')
-rw-r--r--source/game/scripting/StarLuaGameConverters.cpp1
1 files changed, 1 insertions, 0 deletions
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<InventorySlot>::from(LuaEngine& engine, InventorySlot k) {
return engine.createString("swap");
else if (k.is<TrashSlot>())
return engine.createString("trash");
+ else return {}; // avoid UB if every accounted-for case fails
}
Maybe<InventorySlot> LuaConverter<InventorySlot>::to(LuaEngine&, LuaValue const& v) {