mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-18 05:38:38 -04:00
Repair a crash when decoding ISCAT
Passing a auto stack variable to a future is not a good idea as it will almost certainly go out of scope before the future has finished executing.
This commit is contained in:
@@ -147,7 +147,7 @@ extern "C" {
|
||||
float* level, float* sigdb, float* snr, float* dfreq,
|
||||
float* width);
|
||||
|
||||
void fast_decode_(short id2[], int narg[], int* ntrperiod,
|
||||
void fast_decode_(short id2[], int narg[], double * trperiod,
|
||||
char msg[], char mycall[], char hiscall[],
|
||||
fortran_charlen_t, fortran_charlen_t, fortran_charlen_t);
|
||||
void degrade_snr_(short d2[], int* n, float* db, float* bandwidth);
|
||||
@@ -2965,10 +2965,9 @@ void MainWindow::decode() //decode()
|
||||
narg[12]=0;
|
||||
narg[13]=-1;
|
||||
narg[14]=m_config.aggressive();
|
||||
int nTRperiod=m_TRperiod;
|
||||
memcpy(d2b,dec_data.d2,2*360000);
|
||||
watcher3.setFuture (QtConcurrent::run (std::bind (fast_decode_,&d2b[0],
|
||||
&narg[0],&nTRperiod,&m_msg[0][0],
|
||||
&narg[0],&m_TRperiod,&m_msg[0][0],
|
||||
dec_data.params.mycall,dec_data.params.hiscall,8000,12,12)));
|
||||
} else {
|
||||
memcpy(to, from, qMin(mem_jt9->size(), size));
|
||||
|
||||
Reference in New Issue
Block a user