DO NOT READ A ZERO POINTER TO GROOVE

This commit is contained in:
tildearrow 2025-11-23 02:27:42 -05:00
parent 36b321794f
commit aba4744977

View file

@ -1712,6 +1712,11 @@ bool DivEngine::loadFur(unsigned char* file, size_t len, int variantID) {
ds.grooves.reserve(groovePtr.size());
for (size_t i=0; i<groovePtr.size(); i++) {
DivGroovePattern groove;
if (groovePtr[i]==0) {
// could happen due to a bug in unstable Furnace
continue;
}
if (!reader.seek(groovePtr[i],SEEK_SET)) {
logE("couldn't seek to groove %d!",i);
lastError=fmt::sprintf("couldn't seek to groove %d!",i);