Archive: 2.0b1 InstallOptions::initDialog has 2 parms on stack


2.0b1 InstallOptions::initDialog has 2 parms on stack
Just downloaded the latest NSIS beta.

Seems to be well behaved. BUT I discovreed that whereas before when I did

InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\myini.ini"
I would only have one thing to pop off the stack (HWND or 0 for error), now I seem to have 2: the original one AND then the file name of the ini file.

I.e. instead of
;stack empty
InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\myini.ini"
Pop $R0
IntCmp ${TEMP1} 0 error
;stack empty
I now have to do the following ot get the stack back to normal
;stack empty
InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\myini.ini"
Pop $R0
Pop $R1 ; $R1 = c:\windows\temp\..\myini.ini
IntCmp ${TEMP1} 0 error
;stack empty
Is this a bug? or is it a feature that I somehow missed the documentation of?

DD

Yes, you are right. This is indeed a bug. I'll fix this ASAP.


Fixed in latest CVS version.

As show tries to pop out this value you are actually losing the top parameter of your stack here, so it is not recommended to pop it.


As show tries to pop out this value you are actually losing the top parameter of your stack here, so it is not recommended to pop it
I know - I realised after I posted the code that what I was posting was not 100% accurate. Still it showed the problem.

Thanks for such a prompt response - now all I have to do is figure out how to get the CVS version

DD

The FAQ tells you how to.


Incase you already got your hands on the latest version I suggest you update again because there was a bug with the way I fixed this.