Skip to content

Commit e5de4b0

Browse files
committed
Fixed bug in GetDependencies
1 parent baf84e2 commit e5de4b0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/Edif.General.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ LPCTSTR * WINAPI DLLExport GetDependencies()
1515

1616
if (Edif::ExternalJSON)
1717
{
18-
TCHAR JSONFilename [MAX_PATH];
18+
TCHAR * JSONFilename = (TCHAR *)malloc(MAX_PATH * sizeof(TCHAR));
1919

20-
GetModuleFileName (hInstLib, JSONFilename, sizeof (JSONFilename)/sizeof(TCHAR));
20+
GetModuleFileName (hInstLib, JSONFilename, MAX_PATH);
2121

2222
TCHAR * Iterator = JSONFilename + _tcslen(JSONFilename) - 1;
2323

@@ -40,7 +40,7 @@ LPCTSTR * WINAPI DLLExport GetDependencies()
4040
{
4141
TCHAR* tstr = Edif::ConvertString(DependenciesJSON[i]);
4242
Dependencies[Offset + i] = tstr;
43-
Edif::FreeString(tstr);
43+
//Edif::FreeString(tstr);
4444
}
4545

4646
Dependencies[Offset + i] = 0;

0 commit comments

Comments
 (0)