Wilhelm
Wilhelm
Is it sure that the caller of this really knows about `LEN_SCRIPT_FILENAME` https://github.com/EdgeTX/edgetx/blob/d37b3e40518af42b6e54b3bda1b432a8f0431427/radio/src/lua/interface.cpp#L588 https://github.com/EdgeTX/edgetx/blob/d37b3e40518af42b6e54b3bda1b432a8f0431427/radio/src/lua/interface.cpp#L603 and that is wrong at least here: https://github.com/EdgeTX/edgetx/blob/d37b3e40518af42b6e54b3bda1b432a8f0431427/radio/src/lua/interface.cpp#L931
Here are some other places that require `\0`-terminated strings (violated by the 6-char case): https://github.com/EdgeTX/edgetx/blob/81d77684986bdbc5181945f5eb72c054e632ca8c/radio/src/strhelpers.cpp#L577-L604
And here is a patch with some (maybe not all) corrections for review: [mixermess.patch.txt](https://github.com/EdgeTX/edgetx/files/7795670/mixermess.patch.txt)
Well, this string-handling looks to me really weird and dangerous. I would love really to suggest: ``` template using Cstring = std::array; ``` with some simple helper template-functions. Because there...
@raphaelcoeffic `std::array` doesn't use dynamic allocated memory - this is not `std::string` nor `std::vector`
`std::array` has no runtime-overhead compared to raw c-arrays. There might be some code-bloat (flash, not RAM) because of different template-instantiations using different parametrizsations of `std::array`. But I thilnk that the...
Forgot something in the above patch, here is a new one: [mixermess.patch.txt](https://github.com/EdgeTX/edgetx/files/7796057/mixermess.patch.txt)
Some more things to correct: [mixermess.patch.txt](https://github.com/EdgeTX/edgetx/files/7797517/mixermess.patch.txt) @jfrickmann please have a look at these changes.
Some work is needed for #1330
Ok, but before I do that let me ask some more questions or give some remarks: > * You added some checks to clear data when necessary - it looks...