Skip to content

Commit

Permalink
Merge pull request #3 from CBonnell/fix-error-message
Browse files Browse the repository at this point in the history
Fix pluralization in error message
  • Loading branch information
CBonnell authored Aug 8, 2024
2 parents edc29f4 + 9c10a02 commit c6281e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v0.1.2 - 2024-08-08

### Fixes

- Fix pluralization in error message for trailing octets after TLV

## v0.1.1 - 2024-08-07

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyasn1-fasder"
version = "0.1.1"
version = "0.1.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ fn decode_der_rec<'py>(m: NativeHelperModule<'py>, substrate: &'py [u8], asn1_sp
};

if substrate.len() != tlv_octets.len() {
return Err(Pyasn1FasderError::new_err(format!("{} trailing octets after TLV near substrate offset {}", substrate.len() - tlv_octets.len(), offset)));
return Err(Pyasn1FasderError::new_err(format!("{} trailing octet(s) after TLV near substrate offset {}", substrate.len() - tlv_octets.len(), offset)));
}

// initialize tag and tagSet from decoded substrate
Expand Down

0 comments on commit c6281e6

Please sign in to comment.