IfErrors clears the error flag again

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2400 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-03-30 15:08:24 +00:00
parent 31bbb272b2
commit 8f849c07e5
4 changed files with 11 additions and 6 deletions

View file

@ -298,7 +298,6 @@ lang_again:
int NSISCALL ui_doinstall(void)
{
static WNDCLASS wc; // richedit subclassing and bgbg creation
num_sections=g_inst_header->num_sections;
g_flags.autoclose=inst_flags&CH_FLAGS_AUTO_CLOSE;
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
if (!g_is_uninstaller)

View file

@ -274,7 +274,12 @@ static int NSISCALL ExecuteEntry(entry *entry_)
log_printf3("IfFileExists: file \"%s\" does not exist, jumping %d",buf0,parm2);
}
return parm2;
case EW_IFERRORS: return entry_->offsets[!g_flags.exec_error];
case EW_IFERRORS:
{
int f=entry_->offsets[!g_flags.exec_error];
g_flags.exec_error=0;
return f;
}
#ifdef NSIS_SUPPORT_RENAME
case EW_RENAME:
{
@ -694,8 +699,8 @@ static int NSISCALL ExecuteEntry(entry *entry_)
case EW_SENDMESSAGE:
{
int v;
int b3=(int)process_string_fromparm_tobuf(0x03);
int b4=(int)process_string_fromparm_tobuf(0x14);
int b3=(int)process_string_fromparm_tobuf(0x33);
int b4=(int)process_string_fromparm_tobuf(0x44);
if (!(parm5&1)) b3=myatoi((char*)b3);
if (!(parm5&2)) b4=myatoi((char*)b4);

View file

@ -108,7 +108,8 @@ const char * NSISCALL loadHeaders(void)
#endif
{
g_inst_section=(section *) (g_inst_header + 1);
g_inst_page=(page *) (g_inst_section + g_inst_header->num_sections);
num_sections=g_inst_header->num_sections;
g_inst_page=(page *) (g_inst_section + num_sections);
}
g_inst_entry=(entry *) (g_inst_page + g_inst_cmnheader->num_pages);
g_db_strtab = (char *) (g_inst_entry + g_inst_cmnheader->num_entries);

View file

@ -38,7 +38,7 @@ HANDLE NSISCALL myCreateProcess(char *cmd, char *dir)
if (d == INVALID_FILE_ATTRIBUTES || !(d&FILE_ATTRIBUTE_DIRECTORY)) dir=0;
if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, dir, &StartUp, &ProcInfo))
return NULL;
if (NULL != ProcInfo.hThread) CloseHandle( ProcInfo.hThread );
CloseHandle(ProcInfo.hThread);
return ProcInfo.hProcess;
}