From 7b8bf9fc4bc58536e5b9e4265f2c5409459a90b3 Mon Sep 17 00:00:00 2001 From: dinkc64 Date: Fri, 25 Oct 2024 20:48:23 -0400 Subject: [PATCH] burner/win32/romdata.cpp: fix for break after https://github.com/finalburnneo/FBNeo/commit/83505d50e7af27c2312b44180b0ae4094c687acc --- src/burner/win32/romdata.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/burner/win32/romdata.cpp b/src/burner/win32/romdata.cpp index 1ec1def5b3..bbce77f68f 100644 --- a/src/burner/win32/romdata.cpp +++ b/src/burner/win32/romdata.cpp @@ -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; @@ -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;