(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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue