From d3a1c821c87371865d6ae4c650fefbe4a4123fa7 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Tue, 17 Oct 2023 18:31:18 +0200 Subject: [PATCH] fix filename --- src/ini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ini.c b/src/ini.c index 69456b5..7956300 100644 --- a/src/ini.c +++ b/src/ini.c @@ -37,7 +37,7 @@ void ini_create(INIFILE* ini, char* filename) char* buf = malloc(BUF_SIZE); if (buf) { - DWORD size = GetPrivateProfileSectionA(name, buf, BUF_SIZE, ini->filename); + DWORD size = GetPrivateProfileSectionA(name, buf, BUF_SIZE, filename); if (size > 0) { ini->sections[i].data = malloc(size + 2);