mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 19:50:45 +00:00
Resolve CMS50E corrupted record hedaer condition
This commit is contained in:
parent
04dff07933
commit
24bc115a26
@ -347,7 +347,20 @@ int CMS50Loader::doImportMode()
|
||||
} else if (!started_reading) { // have not got a valid trio yet, skip...
|
||||
idx += 1;
|
||||
} else {
|
||||
//Completed
|
||||
// scan ahead for another 0xf0 in case it's corrupted..
|
||||
bool resync = false;
|
||||
|
||||
for (int i=idx; i < available; ++i) {
|
||||
c=(unsigned char)buffer.at(i);
|
||||
if ((c & 0xf0) == 0xf0) {
|
||||
idx = i;
|
||||
resync = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!resync) {
|
||||
// Data transfer has completed
|
||||
finished_import = true;
|
||||
killTimers();
|
||||
m_importing = false;
|
||||
@ -358,6 +371,7 @@ int CMS50Loader::doImportMode()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!started_import) {
|
||||
imp_callbacks = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user