fix(pdu): Error occurred after refactor(pdu) #541

Fixes commit 7419467ad3 ("refactor(core): move cursor.rs")

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau
2024-09-03 06:48:31 -04:00
committed by Benoît Cortier
parent ba49456236
commit 880d5012e6
+1 -1
View File
@@ -244,7 +244,7 @@ fn read_mcspdu_header(src: &mut ReadCursor<'_>, ctx: &'static str) -> DecodeResu
}
fn peek_mcspdu_header(src: &mut ReadCursor<'_>, ctx: &'static str) -> DecodeResult<DomainMcsPdu> {
let choice = src.try_read_u8().map_err(|e| other_err!(ctx, source: e))?;
let choice = src.try_peek_u8().map_err(|e| other_err!(ctx, source: e))?;
DomainMcsPdu::from_choice(choice)
.ok_or_else(|| invalid_field_err(ctx, "domain-mcspdu", "unexpected application tag for CHOICE"))