Skip to content

Fix QueryBuilder.TermAt<T>(int termIndex) - #12

Open
dtaralla wants to merge 1 commit into
deathbeam:mainfrom
dtaralla:fix_termAt_t_index
Open

dtaralla wants to merge 1 commit into
deathbeam:mainfrom
dtaralla:fix_termAt_t_index

Conversation

@dtaralla

@dtaralla dtaralla commented Oct 3, 2026

Copy link
Copy Markdown

Term index was not set before checking the type of the current term, leading to misleading asserts. C++ implementation is setting the term first, then asserting, then returning.

See mirror C++ implementation: https://www.flecs.dev/flecs/query_2builder__i_8hpp_source.html#l00188

(not AI or AI-assisted, good old 🧠 finding and fixing a small bug.)

Term index was not set *before* checking the type of the current term, leading to misleading asserts. C++ implementation is setting the term first, then asserting, then returning.

See mirror C++ implementation: https://www.flecs.dev/flecs/query_2builder__i_8hpp_source.html#l00188
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.

1 participant