diff --git a/SleepLib/session.cpp b/SleepLib/session.cpp index 0395391b..234ebce3 100644 --- a/SleepLib/session.cpp +++ b/SleepLib/session.cpp @@ -514,14 +514,16 @@ bool Session::LoadEvents(QString filename) databytes=temp; } - if (databytes.size()!=datasize) { - qDebug() << "File" << filename << "has returned wrong datasize"; - return false; - } - quint16 crc=qChecksum(databytes.data(),databytes.size()); - if (crc!=crc16) { - qDebug() << "CRC Doesn't match in" << filename; - return false; + if (version>=9) { + if (databytes.size()!=datasize) { + qDebug() << "File" << filename << "has returned wrong datasize"; + return false; + } + quint16 crc=qChecksum(databytes.data(),databytes.size()); + if (crc!=crc16) { + qDebug() << "CRC Doesn't match in" << filename; + return false; + } } QDataStream in(databytes);