Skip to content

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

Merged
deathbeam merged 1 commit into
deathbeam:mainfrom
dtaralla:fix_termAt_t_index
Oct 19, 2026
Merged

deathbeam merged 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
@deathbeam
deathbeam merged commit 0e10b15 into deathbeam:main Oct 19, 2026
3 checks passed
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