mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-27 02:05:10 +03:00
No more 2MB array on the stack
This commit is contained in:
parent
c994260c85
commit
37a0258b19
1 changed files with 4 additions and 1 deletions
|
@ -342,7 +342,10 @@ bool FirmwareInterface::isValid()
|
|||
|
||||
unsigned int FirmwareInterface::save(QString fileName)
|
||||
{
|
||||
uint8_t binflash[FSIZE_MAX];
|
||||
uint8_t *binflash = (uint8_t*)malloc(FSIZE_MAX);
|
||||
if (binflash == NULL) {
|
||||
return -1;
|
||||
}
|
||||
memcpy(&binflash, flash.constData(), flashSize);
|
||||
QFile file(fileName);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue