Skip to content

Conversation

@GHJ75
Copy link

@GHJ75 GHJ75 commented Dec 24, 2025

… bounds

Changed line 116 from self.path.len() < next_i to self.path.len() <= next_i to properly handle the case when next_i equals the path length.

This fixes a panic that occurred when:

  • self.path.len() is 3 and next_i is 3
  • The old check (3 < 3) was false, so it didn't break
  • Then self.path[3] caused an index out of bounds error

The correct check ensures we break before attempting to access an invalid index.

🤖 Generated with Claude Code

… bounds

Changed line 116 from `self.path.len() < next_i` to `self.path.len() <= next_i`
to properly handle the case when next_i equals the path length.

This fixes a panic that occurred when:
- self.path.len() is 3 and next_i is 3
- The old check (3 < 3) was false, so it didn't break
- Then self.path[3] caused an index out of bounds error

The correct check ensures we break before attempting to access an invalid index.

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

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 24, 2025

CodSpeed Performance Report

Merging #128 will degrade performance by 10.86%

Comparing GHJ75:fix-path-with-height-oob (9e56e01) with main (49de93a)

Summary

❌ 2 regressions
✅ 39 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Efficiency
no path Vec2(0.0, 0.0)-Vec2(0.0, 0.0) 3.2 µs 3.5 µs -10.86%
no path Vec2(0.0, 0.0)-Vec2(575.0, 410.0) 3.2 µs 3.5 µs -10.86%

@mockersf
Copy link
Member

fixed by #124

@mockersf mockersf closed this Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants