Skip to content

Commit

Permalink
burner/win32/romdata.cpp: fix for break after 83505d5
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkc64 committed Oct 26, 2024
1 parent 1968b5f commit 7b8bf9f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/burner/win32/romdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ static INT32 LoadRomdata()
RDI.nDescCount++;

if (NULL != pDataRomDesc) {
pDataRomDesc[RDI.nDescCount].szName = (char*)malloc(512);

strcpy(pDataRomDesc[RDI.nDescCount].szName, TCHARToANSI(pszLabel, NULL, 0));

pDataRomDesc[RDI.nDescCount].nLen = ri.nLen;
Expand Down Expand Up @@ -402,6 +404,11 @@ void RomDataSetFullName()
void RomDataExit()
{
if (NULL != pDataRomDesc) {

for (int i = 0; i < RDI.nDescCount + 1; i++) {
free(pDataRomDesc[RDI.nDescCount].szName);
}

free(pDataRomDesc);
pDataRomDesc = NULL;

Expand Down

0 comments on commit 7b8bf9f

Please sign in to comment.