(brainsucker) bug-fix-release, 4.06.2004
1. System::Copy /SIZE fixed (Kichik). 2. System::Copy with destination auto-allocation now pushes destination address on stack. 3. Callbacks fixed (Kichik's kick is awesome). git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3555 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5c4deddee2
commit
879a8245bc
5 changed files with 36 additions and 20 deletions
|
@ -13,13 +13,13 @@ TempStack *tempstack = NULL;
|
|||
|
||||
PLUGINFUNCTIONSHORT(Alloc)
|
||||
{
|
||||
int size;
|
||||
if ((size = popint()) == 0)
|
||||
{
|
||||
pushint(0);
|
||||
return;
|
||||
}
|
||||
pushint((int) GlobalAlloc(GPTR, size));
|
||||
int size;
|
||||
if ((size = popint()) == 0)
|
||||
{
|
||||
pushint(0);
|
||||
return;
|
||||
}
|
||||
pushint((int) GlobalAlloc(GPTR, size));
|
||||
}
|
||||
PLUGINFUNCTIONEND
|
||||
|
||||
|
@ -27,9 +27,9 @@ PLUGINFUNCTIONSHORT(Copy)
|
|||
{
|
||||
int size = 0;
|
||||
HANDLE source, dest;
|
||||
char *str;
|
||||
char *str;
|
||||
// Get the string
|
||||
if ((str = popstring()) == NULL) return;
|
||||
if ((str = popstring()) == NULL) return;
|
||||
|
||||
// Check for size option
|
||||
if (str[0] == '/')
|
||||
|
@ -43,7 +43,11 @@ PLUGINFUNCTIONSHORT(Copy)
|
|||
// Ok, check the size
|
||||
if (size == 0) size = (int) GlobalSize(source);
|
||||
// and the destinantion
|
||||
if ((int) dest == 0) dest = GlobalAlloc((GPTR), size);
|
||||
if ((int) dest == 0)
|
||||
{
|
||||
dest = GlobalAlloc((GPTR), size);
|
||||
pushint(dest);
|
||||
}
|
||||
|
||||
// COPY!
|
||||
copymem(dest, source, size);
|
||||
|
|
|
@ -993,7 +993,7 @@ SystemProc __declspec(naked) *CallProc(SystemProc *proc)
|
|||
|
||||
// Save return
|
||||
proc->Params[0].Value = z1;
|
||||
if (proc->Params[0].Size == 2)
|
||||
// if (proc->Params[0].Size == 2)
|
||||
proc->Params[0]._value = z2;
|
||||
// Proc result: OK
|
||||
proc->ProcResult = PR_OK;
|
||||
|
@ -1161,8 +1161,9 @@ SystemProc __declspec(naked) *CallBack(SystemProc *proc)
|
|||
_asm
|
||||
{
|
||||
// Prepare return
|
||||
// mov eax, z1
|
||||
//mov edx, z2
|
||||
// callback proc result
|
||||
pop edx
|
||||
pop eax
|
||||
|
||||
// Restore temporary stack and return
|
||||
|
||||
|
@ -1178,16 +1179,23 @@ SystemProc __declspec(naked) *CallBack(SystemProc *proc)
|
|||
}
|
||||
|
||||
#ifdef SYSTEM_LOG_DEBUG
|
||||
_asm
|
||||
{
|
||||
push eax
|
||||
push edx
|
||||
}
|
||||
SYSTEM_EVENT("\n\t\t\tSh-Before call-back");
|
||||
SYSTEM_LOG_POST;
|
||||
_asm
|
||||
{
|
||||
// callback proc result
|
||||
pop edx
|
||||
pop eax
|
||||
}
|
||||
#endif
|
||||
|
||||
// Fake return from Callback
|
||||
_asm {
|
||||
// callback proc result
|
||||
pop edx
|
||||
pop eax
|
||||
|
||||
// Restore registers
|
||||
pop esi
|
||||
pop edi
|
||||
|
|
|
@ -82,7 +82,6 @@
|
|||
RuntimeLibrary="4"
|
||||
StructMemberAlignment="0"
|
||||
BufferSecurityCheck="FALSE"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="3"
|
||||
AssemblerOutput="2"
|
||||
WarningLevel="3"
|
||||
|
@ -97,7 +96,6 @@
|
|||
OutputFile="d:\Program FIles\NSIS\Plugins\System.dll"
|
||||
LinkIncremental="1"
|
||||
IgnoreAllDefaultLibraries="TRUE"
|
||||
GenerateDebugInformation="TRUE"
|
||||
GenerateMapFile="TRUE"
|
||||
MapExports="TRUE"
|
||||
MapLines="TRUE"
|
||||
|
|
|
@ -35,4 +35,10 @@ automaticaly.
|
|||
release 5, 11 september 2003.
|
||||
1. u flag - unload dll after procedure call.
|
||||
2. some changes to asm to turn on Whole Program Optimization.
|
||||
3. Dll shrinked for 1 kb.
|
||||
3. Dll shrinked for 1 kb.
|
||||
|
||||
bug-fix-release, 4.06.2004
|
||||
1. System::Copy /SIZE fixed (Kichik).
|
||||
2. System::Alloc with destination auto-allocation now pushes destination
|
||||
address on stack.
|
||||
3. Callbacks fixed (Kichik's kick is awesome).
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue