Skip to content

Fix possible invalid ranges for LookUp#108

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Jun 3, 2026
Merged

Fix possible invalid ranges for LookUp#108
cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens String.isWord by preventing invalid CFRange values returned from DCSGetTermRangeInString from being passed into DCSCopyTextDefinition, avoiding potential crashes or undefined behavior when performing dictionary lookups.

Changes:

  • Add a guard to ensure the CFRange returned by DCSGetTermRangeInString is valid before using it for definition lookup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cyanzhong cyanzhong merged commit 36d40ab into main Jun 3, 2026
2 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