Skip to content

Commit

Permalink
Return IERR_NULL_VALUE when a null bool is read, matching other value…
Browse files Browse the repository at this point in the history
… behaviors (#339)
  • Loading branch information
nirosys authored Feb 14, 2024
1 parent 1dc0e0b commit e5fb755
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ionc/ion_reader_text.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,9 @@ iERR _ion_reader_text_read_bool(ION_READER *preader, BOOL *p_value)
else if (text->_value_sub_type == IST_BOOL_FALSE) {
*p_value = FALSE;
}
else if ((text->_value_sub_type->flags & FCF_IS_NULL) != 0) {
FAILWITH(IERR_NULL_VALUE)
}
else {
FAILWITH(IERR_INVALID_STATE);
}
Expand Down

0 comments on commit e5fb755

Please sign in to comment.