Passing variables to "out" Vector2/3 parameters doesn't work

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Passing variables to "out" Vector2/3 parameters doesn't work

Postby phantombeta » Fri Nov 15, 2019 11:26 am

As it says in the thread title, you can't pass variables as to Vector2/3 out parameters. Turns out there's some other issue my fix doesn't deal with. Heap-allocated values (e.g., member variables) can be passed just fine, while stack-allocated values (e.g., local variables) just crash GZDoom.
There seems to be two issues - First, it seems like it may still be calculating the wrong amount of parameters in the function call code. Second, there must be some issue where it doesn't correctly calculate or pass the vector's memory address.
User avatar
In the meadow of sinful thoughts, every flower's a perfect one
Joined: 02 May 2013
Location: The United Soviet Socialist Dictatorship of Hueland
Discord: phantombeta#2461
Github ID: Doom2fan
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Return to Bugs

Who is online

Users browsing this forum: No registered users and 16 guests