Skip to content

Commit

Permalink
Improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Jan 23, 2022
1 parent 8304f0d commit 0899c5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/jsoncons/decode_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<value_type,CharT>::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;
}
Expand Down

0 comments on commit 0899c5f

Please sign in to comment.