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

Crash when attaching multiple images to MessageInputBar #16

Open
tkeithblack opened this issue Jan 7, 2019 · 5 comments
Open

Crash when attaching multiple images to MessageInputBar #16

tkeithblack opened this issue Jan 7, 2019 · 5 comments

Comments

@tkeithblack
Copy link
Contributor

I encountered a crash when crash when inserting text followed by multiple pictures into the MessageInputBar.

The crash occurs in parseForComponents() located in InputTextView.swift.

The following line was the culprit:

let textRange = NSMakeRange(curLocation, range.location)
This worked fine on the first image, but subsequent images crashed because the length should be range.location-curLocation as below:

let textRange = NSMakeRange(curLocation, range.location-curLocation)
With this change it is now working.

KeithB

@tkeithblack
Copy link
Contributor Author

I attempted to do a Pull Request, but may not have permission.

Here'a a screenshot in the debugger showing the fix

messagekitscreenshot
.

@nathantannar4
Copy link
Member

Thanks @tkeithblack , want to make a PR?

Sent with GitHawk

@tkeithblack
Copy link
Contributor Author

tkeithblack commented Jan 7, 2019 via email

@nathantannar4
Copy link
Member

@tkeithblack If you fork MK to your own repo you can make a PR from tahr branch.

Sent with GitHawk

@tkeithblack
Copy link
Contributor Author

#17

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

No branches or pull requests

2 participants