Skip to content
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

Fix potential crash in screen name handling #557

Open
wants to merge 1 commit into
base: develop-v2
Choose a base branch
from

Conversation

servercimen
Copy link

Description

If name happens to be "UIHostingController", current implementation will crash with an:
Swift/RangeReplaceableCollection.swift:599: Fatal error: Can't remove more items from a collection than it has.
The starts(with:...) check should be done with the exact string we're going to remove.

If `name` happens to be "UIHostingController", current implementation will crash with an:

Swift/RangeReplaceableCollection.swift:599: Fatal error: Can't remove more items from a collection than it has.

The `starts(with:...)` check should be done with the exact string we're going to remove.
@servercimen servercimen requested a review from a team as a code owner February 11, 2025 15:25
@contributor-support
Copy link

Thank you @servercimen for contributing this PR.
Please sign the Contributor License Agreement (CLA) before merging.

@SKannaniOS
Copy link
Contributor

Hi, @servercimen,

We truly appreciate your effort. Our team will review it and take the necessary actions.

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