Skip to content

Clear the attribute cursor when moving to the root - #84

Merged
zhengchun merged 1 commit into
antchfx:masterfrom
yuefdev:fix/root-attribute-cursor-sol
Oct 19, 2026
Merged

zhengchun merged 1 commit into
antchfx:masterfrom
yuefdev:fix/root-attribute-cursor-sol

Conversation

@yuefdev

@yuefdev yuefdev commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Clear the attribute cursor in NodeNavigator.MoveToRoot. Navigating from an attribute back to the root currently retains its attribute index, so MoveToChild incorrectly returns false and other attribute-dependent operations can access the wrong node.

The regression fails before the fix. Full tests and changed-file gofmt pass. Vet reports the existing testing.T.Fatalf call from a non-test goroutine at query_test.go:210; that file is unchanged.

@zhengchun
zhengchun merged commit c81db40 into antchfx:master Oct 19, 2026
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