From c0c0191dbc5d7701ca2dc85bbe26268eeb8c9648 Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 7 Nov 2002 20:12:01 +0000 Subject: [PATCH] WriteIniStr flushing enabled git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1613 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/exec.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index c0405286..baf917e4 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -1109,24 +1109,26 @@ static int NSISCALL ExecuteEntry(entry *entry_) #ifdef NSIS_SUPPORT_INIFILES case EW_WRITEINI: { - char *sec=0, *ent=0; - char *buf0=process_string_fromparm_tobuf(0x00); - char *buf3; + char *sec=0, *key=0, *str=0; #ifdef NSIS_CONFIG_LOG mystrcpy(buf1,""); mystrcpy(buf2,buf1); #endif + if (parm0) + { + sec=process_string_fromparm_tobuf(0x00); + } if (parm1) { sec=process_string_fromparm_tobuf(0x11); } if (parm2) { - ent=process_string_fromparm_tobuf(0x22); + str=process_string_fromparm_tobuf(0x22); } buf3=process_string_fromparm_tobuf(0x33); log_printf5("WriteINIStr: wrote [%s] %s=%s in %s",buf0,buf1,buf2,buf3); - if (!WritePrivateProfileString(buf0,sec,ent,buf3)) exec_errorflag++; + if (!WritePrivateProfileString(sec,key,str,buf3)) exec_errorflag++; } return 0; case EW_READINISTR: