amazon-ion / ion-c

A C implementation of Amazon Ion.
https://amazon-ion.github.io/ion-docs/
Apache License 2.0
166 stars 43 forks source link

Make behavior of reading a null.bool match other null values in ion text #339

Closed nirosys closed 9 months ago

nirosys commented 9 months ago

Issue #, if available: #330

Description of changes: Prior to this PR reading a null bool using a text reader would result in an IERR_INVALID_STATE, which does not communicate the actual issue, and deviates from the behavior of other Ion values.

This PR handles the specific case of null.bool and returns an IERR_NULL_VALUE.

Thanks to @ezabes for finding and reporting this issue.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.