You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling a script with a parameter pushes the parameter on to the conventional stack but never pops the parameter from the stack prior to script execution.
If you try to reference the parameter itself after altering the stack in your script, you WILL alter the value of the parameter!
To Reproduce
Alter the stack prior to referencing the parameter.
For example:
Pushing onto the stack before selecting the parameter in a Switch-Case and only popping the stack after the Switch-Case
Without altering the stack, this behaves as expected
Shouldn't parameters be relocated into special reserved memory (like a separate, dedicated stack) and the conventional stack popped prior to the script's execution?
Platform
Windows 10
The text was updated successfully, but these errors were encountered:
MaverickLoneshark
changed the title
Calling Scripts with Parameters Uses Stack But Never Frees Stack Prior to Script Execution
Calling Scripts with Parameters Uses Stack but Never Frees Stack Prior to Script Execution
Jan 13, 2025
Description
Calling a script with a parameter pushes the parameter on to the conventional stack but never pops the parameter from the stack prior to script execution.
If you try to reference the parameter itself after altering the stack in your script, you WILL alter the value of the parameter!
To Reproduce
Alter the stack prior to referencing the parameter.
For example:
Pushing onto the stack before selecting the parameter in a Switch-Case and only popping the stack after the Switch-Case
Without altering the stack, this behaves as expected

...but this does NOT!

Expected behavior
Shouldn't parameters be relocated into special reserved memory (like a separate, dedicated stack) and the conventional stack popped prior to the script's execution?
Platform
Windows 10

The text was updated successfully, but these errors were encountered: