mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 18:50:44 +00:00
More silly event file verison muckup fixed.. Should be good now
This commit is contained in:
parent
002fbd33e1
commit
05b0b20973
@ -25,7 +25,7 @@ const quint16 filetype_data=1;
|
|||||||
// This is the uber important database version for SleepyHeads internal storage
|
// This is the uber important database version for SleepyHeads internal storage
|
||||||
// Increment this after stuffing with Session's save & load code.
|
// Increment this after stuffing with Session's save & load code.
|
||||||
const quint16 summary_version=11;
|
const quint16 summary_version=11;
|
||||||
const quint16 events_version=9;
|
const quint16 events_version=10;
|
||||||
|
|
||||||
Session::Session(Machine * m,SessionID session)
|
Session::Session(Machine * m,SessionID session)
|
||||||
{
|
{
|
||||||
@ -497,7 +497,7 @@ bool Session::LoadEvents(QString filename)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version<9) {
|
if (version<10) {
|
||||||
file.seek(32);
|
file.seek(32);
|
||||||
} else {
|
} else {
|
||||||
header >> compmethod; // Compression Method (quint16)
|
header >> compmethod; // Compression Method (quint16)
|
||||||
@ -508,13 +508,16 @@ bool Session::LoadEvents(QString filename)
|
|||||||
|
|
||||||
QByteArray databytes,temp=file.readAll();
|
QByteArray databytes,temp=file.readAll();
|
||||||
file.close();
|
file.close();
|
||||||
if (compmethod>0) {
|
|
||||||
databytes=qUncompress(temp);
|
if (version>=10) {
|
||||||
} else {
|
if (compmethod>0) {
|
||||||
databytes=temp;
|
databytes=qUncompress(temp);
|
||||||
|
} else {
|
||||||
|
databytes=temp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version>=9) {
|
if (version>=10) {
|
||||||
if (databytes.size()!=datasize) {
|
if (databytes.size()!=datasize) {
|
||||||
qDebug() << "File" << filename << "has returned wrong datasize";
|
qDebug() << "File" << filename << "has returned wrong datasize";
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user