diff --git a/src/amulet_nbt/cpp/nbt_encoding/string/read_string.cpp b/src/amulet_nbt/cpp/nbt_encoding/string/read_string.cpp index 87b31ebe..644f2f93 100644 --- a/src/amulet_nbt/cpp/nbt_encoding/string/read_string.cpp +++ b/src/amulet_nbt/cpp/nbt_encoding/string/read_string.cpp @@ -421,7 +421,11 @@ AmuletNBT::TagNode _read_snbt(const AmuletNBT::CodePointVector& snbt, size_t& in return AmuletNBT::write_utf8(string); } } - throw std::runtime_error("Should have returned before now."); +#if defined(_MSC_VER) && !defined(__clang__) // MSVC + __assume(false); +#else // GCC, Clang + __builtin_unreachable(); +#endif }