Repair annotation reading

This commit is contained in:
Tony Garnock-Jones 2022-11-04 21:06:33 +01:00
parent 0d1522d869
commit fddb910175
1 changed files with 5 additions and 1 deletions

View File

@ -467,7 +467,11 @@ impl<'de, 'src, S: BinarySource<'de>> Reader<'de> for PackedReader<'de, 'src, S>
}
fn open_annotation(&mut self) -> ReaderResult<()> {
self.next_compound(Tag::Annotation, ExpectedKind::Annotation)
if let Tag::Annotation = Tag::try_from(self.peek_noeof()?)? {
Ok(self.skip()?)
} else {
Err(error::Error::Expected(ExpectedKind::Annotation))
}
}
fn close_annotation(&mut self) -> ReaderResult<()> {