Skip to content

Fix array index parser bug #6

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

Merged
merged 2 commits into from
May 29, 2025
Merged

Fix array index parser bug #6

merged 2 commits into from
May 29, 2025

Conversation

jacwright
Copy link
Member

Summary

  • Replace Infinity return value with -1 for invalid numeric indices
  • Prevents unexpected behavior in array operations with non-numeric strings
  • Uses conventional -1 "not found" value instead of problematic Infinity

Test plan

  • All JSON patch tests pass (231 tests)
  • Verified fix handles invalid indices properly

🤖 Generated with Claude Code

jacwright and others added 2 commits May 23, 2025 11:04
Replace Infinity return value with -1 for invalid numeric indices in
toArrayIndex function. This prevents unexpected behavior in array operations
when non-numeric strings are used as indices.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jacwright jacwright merged commit b6dbee2 into main May 29, 2025
@jacwright jacwright deleted the fix/array-index-parser-bug branch May 29, 2025 02:01
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