1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

AUX array overflow bugfix, bug found by disq

This commit is contained in:
cTn 2013-06-18 13:37:31 +02:00
parent 29343686c5
commit fa90fbcbc4

View file

@ -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));
} }