Skip to content

Commit

Permalink
Program data: increase name max len to 40
Browse files Browse the repository at this point in the history
Some programs come with names larger than 20 bytes.
40 bytes seems to be the max that can be stored in a OneProgramResp message.
  • Loading branch information
fengalin committed Jan 30, 2024
1 parent e5ce9ca commit bfa792d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jstation/data/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl ProgramData {
// Safety: the link between `ParameterNumber::MAX` and `PARAM_COUNT`
// is used as an invariant for optimizations in some operations.
pub const PARAM_COUNT: usize = (ParameterNumber::MAX.as_u8() + 1) as usize;
const NAME_MAX_LEN: usize = 20;
const NAME_MAX_LEN: usize = 40;

fn try_new(buf: Box<[RawValue; Self::PARAM_COUNT]>, name: String) -> Result<Self, Error> {
if name.len() > Self::NAME_MAX_LEN {
Expand Down

0 comments on commit bfa792d

Please sign in to comment.