fix for cdl sram logging hack crashes nsf logging (fixed #94)

This commit is contained in:
g0me3 2020-01-29 20:44:49 +03:00
parent 18165938d4
commit fb8d46d969
1 changed files with 8 additions and 4 deletions

View File

@ -562,8 +562,10 @@ void InitCDLog()
cdloggerVideoDataSize = CHRsize[0];
cdloggervdata = (unsigned char*)malloc(cdloggerVideoDataSize);
} else {
cdloggerVideoDataSize = 0;
cdloggervdata = (unsigned char*)malloc(8192);
if (GameInfo->type != GIT_NSF) {
cdloggerVideoDataSize = 0;
cdloggervdata = (unsigned char*)malloc(8192);
}
}
}
@ -576,8 +578,10 @@ void ResetCDLog()
undefinedvromcount = cdloggerVideoDataSize;
ZeroMemory(cdloggervdata, cdloggerVideoDataSize);
} else {
undefinedvromcount = 8192;
ZeroMemory(cdloggervdata, 8192);
if (GameInfo->type != GIT_NSF) {
undefinedvromcount = 8192;
ZeroMemory(cdloggervdata, 8192);
}
}
}