powder limit is min of 255 and current powders amount
This commit is contained in:
parent
b4f61b9eb1
commit
9835e9f9d2
1 changed files with 2 additions and 1 deletions
|
@ -215,7 +215,8 @@ fn cook(
|
|||
dbg!(&powdervec);
|
||||
}
|
||||
|
||||
let powderlimitfr: u8 = powdervec.len() as u8;
|
||||
let powderlimitfr: u8 = (powdervec.len() as u8)
|
||||
.min(255); // min of the current number of powders and 255 (if you have over 255 powders stuff breaks)
|
||||
|
||||
// ENCODE: PowderData
|
||||
// only occurs if the powders array is present and the powder limit is also present
|
||||
|
|
Loading…
Reference in a new issue