File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -146,17 +146,17 @@ macro_rules! impl_custom_class {
146
146
// Decode IMPLICIT header
147
147
let header = Header :: decode( reader) ?;
148
148
149
+ // the encoding shall be constructed if the base encoding is constructed
150
+ if header. tag. is_constructed( ) != T :: CONSTRUCTED {
151
+ return Err ( header. tag. non_canonical_error( ) . into( ) ) ;
152
+ }
153
+
149
154
// read_nested checks if header matches decoded length
150
155
let value = reader. read_nested( header. length, |reader| {
151
156
// Decode inner IMPLICIT value
152
157
T :: decode_value( reader, header)
153
158
} ) ?;
154
159
155
- // the encoding shall be constructed if the base encoding is constructed
156
- if header. tag. is_constructed( ) != T :: CONSTRUCTED {
157
- return Err ( header. tag. non_canonical_error( ) . into( ) ) ;
158
- }
159
-
160
160
Ok ( Some ( Self {
161
161
tag_number,
162
162
tag_mode: TagMode :: Implicit ,
You can’t perform that action at this time.
0 commit comments