Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crashes caused due to missing type specifier on visual shader editor #75809

Merged

Conversation

komugi1211s
Copy link
Contributor

Fixes #75790

This PR adds (appears to be) a missing vector type specifier for Vector2 variant of Ceil function registered in visual shader editor.

Cause
Creating a Ceil/Vector2 node on visual shader editor crashes the engine, due to the out of bounds error.
this is caused by the fact that the p_ops for AddOption struct corresponding to Ceil/Vector2 has only 1 item in it, instead of 2 items (both function specifier and vector type specifier) like the engine expects.

upon node setup, it tries to access the non-existent 2nd item to figure out which vector type this node should handle, which causes out of bounds.

…ader Editor

crashes engine due to index out of bounds.
@kleonc kleonc requested a review from Chaosus April 8, 2023 08:22
@Chaosus Chaosus merged commit e684d12 into godotengine:master Apr 8, 2023
@Chaosus
Copy link
Member

Chaosus commented Apr 8, 2023

Thanks! And congrats with your first contribution to the Godot Engine!

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attempting to add a Ceil Vector2 to a visual shader will crash the engine.
4 participants