mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 20:20:44 +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...
|
} else if (!started_reading) { // have not got a valid trio yet, skip...
|
||||||
idx += 1;
|
idx += 1;
|
||||||
} else {
|
} 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;
|
finished_import = true;
|
||||||
killTimers();
|
killTimers();
|
||||||
m_importing = false;
|
m_importing = false;
|
||||||
@ -358,6 +371,7 @@ int CMS50Loader::doImportMode()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!started_import) {
|
if (!started_import) {
|
||||||
imp_callbacks = 0;
|
imp_callbacks = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user