Skip to content

Commit

Permalink
Improve data length test
Browse files Browse the repository at this point in the history
  • Loading branch information
febo committed Nov 18, 2023
1 parent 39295a9 commit 4b63cd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clients/rust/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn clean(value: String) -> String {

/// Checks that the `master_edition` is Programmable NFT master edition.
pub fn assert_edition_is_programmable(edition_data: &[u8]) -> Result<(), MplTokenMetadataError> {
if !edition_data.is_empty() {
if edition_data.len() > TOKEN_STANDARD_OFFSET {
// the first byte is the account key
let key = Key::deserialize(&mut &edition_data[0..1])
.map_err(|_error| MplTokenMetadataError::InvalidEditionKey)?;
Expand Down

0 comments on commit 4b63cd0

Please sign in to comment.