Skip to content

Fix two bugs in NextWordInDoNotBreakList#18

Open
ivandrofly wants to merge 1 commit intomainfrom
fix/next-word-do-not-break-list
Open

Fix two bugs in NextWordInDoNotBreakList#18
ivandrofly wants to merge 1 commit intomainfrom
fix/next-word-do-not-break-list

Conversation

@ivandrofly
Copy link
Copy Markdown
Owner

Summary

  • Loop condition used || instead of &&, making i > 50 always true and causing out-of-bounds access on text
  • Loop body read text[index] (fixed position) instead of text[i], so the same character was inspected every iteration instead of advancing through the word

Test plan

  • Import plain text with phrases like "Mr. Smith goes to..." and verify line breaks are not inserted after "Mr."
  • Verify no IndexOutOfRangeException occurs during plain text import

🤖 Generated with Claude Code

- Loop condition used || instead of &&, making i > 50 always true
  and causing out-of-bounds access
- Loop body read text[index] (fixed position) instead of text[i],
  so the same character was checked every iteration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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