Skip to content

Crash when attaching multiple images to MessageInputBar #16

@tkeithblack

Description

@tkeithblack

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions