1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 00:05:22 +03:00

Added 0 terminator to custom defaults before flashing. (#1611)

Added 0 terminator to custom defaults before flashing.
This commit is contained in:
Michael Keller 2019-09-04 01:11:09 +12:00 committed by GitHub
commit 054ab5e02a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,6 +60,9 @@ function generateData(firmware, input, startAddress) {
throw new Error('Configuration area in firmware not free.');
}
// Add 0 terminator
input = input + '\0';
var inputIndex = 0;
while (inputIndex < input.length) {
var remaining = input.length - inputIndex;