diff --git a/include/jsoncons/decode_traits.hpp b/include/jsoncons/decode_traits.hpp index e743c57125..d237b323cf 100644 --- a/include/jsoncons/decode_traits.hpp +++ b/include/jsoncons/decode_traits.hpp @@ -457,9 +457,9 @@ namespace jsoncons { for (std::size_t i = 0; i < N && cursor.current().event_type() != staj_event_type::end_array && !ec; ++i) { v[i] = decode_traits::decode(cursor, decoder, ec); - if (ec) {return T{};} + if (ec) {return v;} cursor.next(ec); - if (ec) {return T{};} + if (ec) {return v;} } return v; }