mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
AUX array overflow bugfix, bug found by disq
This commit is contained in:
parent
29343686c5
commit
fa90fbcbc4
1 changed files with 4 additions and 0 deletions
|
@ -560,6 +560,10 @@ function process_message(code, data) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSP_codes.MSP_BOX:
|
case MSP_codes.MSP_BOX:
|
||||||
|
// dump previous data (if there was any)
|
||||||
|
AUX_CONFIG_values = new Array();
|
||||||
|
|
||||||
|
// fill in current data
|
||||||
for (var i = 0; i < data.byteLength; i += 2) { // + 2 because uint16_t = 2 bytes
|
for (var i = 0; i < data.byteLength; i += 2) { // + 2 because uint16_t = 2 bytes
|
||||||
AUX_CONFIG_values.push(view.getUint16(i, 1));
|
AUX_CONFIG_values.push(view.getUint16(i, 1));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue