mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 18:50:44 +00:00
fix dumpStr faults
This commit is contained in:
parent
47719a4d09
commit
d74d4fc1e8
@ -59,7 +59,7 @@ QByteArray * EDFInfo::Open(const QString & name)
|
|||||||
// }
|
// }
|
||||||
fi.close();
|
fi.close();
|
||||||
if (fileData->size() <= EDFHeaderSize) {
|
if (fileData->size() <= EDFHeaderSize) {
|
||||||
delete fileData;
|
fileData->clear();
|
||||||
qDebug() << "EDFInfo::Open() File too short " << name;
|
qDebug() << "EDFInfo::Open() File too short " << name;
|
||||||
sleep(1);
|
sleep(1);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -121,6 +121,10 @@ int main(int argc, char *argv[]) {
|
|||||||
if (lastSig == 0 )
|
if (lastSig == 0 )
|
||||||
lastSig = str.GetNumSignals();
|
lastSig = str.GetNumSignals();
|
||||||
|
|
||||||
|
if (((first > 0)&&(last == 0)) || last > size)
|
||||||
|
last = size;
|
||||||
|
|
||||||
|
date = date.addDays(first);
|
||||||
// For each data record, representing 1 day each
|
// For each data record, representing 1 day each
|
||||||
for (int rec = first; rec < last+1; ++rec, date = date.addDays(1)) {
|
for (int rec = first; rec < last+1; ++rec, date = date.addDays(1)) {
|
||||||
qDebug() << "Record no. " << rec << " Date: " << date.toString() ;
|
qDebug() << "Record no. " << rec << " Date: " << date.toString() ;
|
||||||
@ -155,8 +159,8 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qDebug() << "Deleting the edf object";
|
// qDebug() << "Deleting the edf object";
|
||||||
delete &str;
|
// delete &str;
|
||||||
QThread::sleep(1);
|
QThread::sleep(1);
|
||||||
qDebug() << "Done";
|
qDebug() << "Done";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user