Fix a panic when checking for magic number in firmware
This commit is contained in:
+2
-2
@@ -215,8 +215,8 @@ impl App {
|
|||||||
{
|
{
|
||||||
warn!(
|
warn!(
|
||||||
"App: SysEx does not start with magic number; first {} bytes = {}. dropping.",
|
"App: SysEx does not start with magic number; first {} bytes = {}. dropping.",
|
||||||
MAGIC_NUMBER,
|
MAGIC_NUMBER_LEN.min(sysex.len()),
|
||||||
sysex[..MAGIC_NUMBER_LEN]
|
sysex[..MAGIC_NUMBER_LEN.min(sysex.len())]
|
||||||
);
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user