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

Core: Fix recursion level check for VariantWriter::write() with objects #81123

Conversation

dalexeev
Copy link
Member

Fixes a crash on the following code:

class Test extends Resource:
    @export var a: Resource

func _run() -> void:
    var test := Test.new()
    test.a = test
    print(var_to_str(test))

See #81114 (comment).

Also includes minor code style changes (recursion_countp_recursion_count, blank lines).

@dalexeev dalexeev added bug topic:core crash cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Aug 29, 2023
@dalexeev dalexeev added this to the 4.2 milestone Aug 29, 2023
@dalexeev dalexeev requested a review from a team as a code owner August 29, 2023 12:13
@akien-mga akien-mga merged commit c8c2a7e into godotengine:master Aug 29, 2023
@akien-mga
Copy link
Member

Thanks!

@dalexeev dalexeev deleted the core-fix-recursion-check-for-wariant-writer-objects branch August 29, 2023 13:26
@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Sep 20, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.2.

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.

3 participants