Skip to content

Fix members named _ not being created in structs#1568

Merged
SanderMertens merged 2 commits intoSanderMertens:masterfrom
GsLogiMaker:fix/struct-init-member-ignored
Feb 18, 2025
Merged

Fix members named _ not being created in structs#1568
SanderMertens merged 2 commits intoSanderMertens:masterfrom
GsLogiMaker:fix/struct-init-member-ignored

Conversation

@GsLogiMaker
Copy link
Copy Markdown
Contributor

This PR fixes an issue I found with ecs_struct_init. When attempting to initialize a struct with a member named _ the member would silently not be created at all. The issue was that the method used to create the members, ecs_entity, would return the any entity instead of creating a new one. Swapping that method for ecs_new_from_path fixes the issue.

@SanderMertens
Copy link
Copy Markdown
Owner

Looks good to me! After you update distr/flecs.c as well CI should pass.

@GsLogiMaker
Copy link
Copy Markdown
Contributor Author

Cool! I updated it manually this time, but for future reference, is there a way to update it automaticly from src/?

@SanderMertens SanderMertens merged commit 0d6b3ce into SanderMertens:master Feb 18, 2025
71 checks passed
@SanderMertens
Copy link
Copy Markdown
Owner

It will automatically update when you run bake in the root of the repository.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants