Prevent crash

This commit is contained in:
M66B 2020-09-23 08:27:19 +02:00
parent 8876851089
commit 506494633e
1 changed files with 4 additions and 0 deletions

View File

@ -2198,6 +2198,10 @@ public class FragmentCompose extends FragmentBase {
int start = args.getInt("start");
SpannableStringBuilder s = new SpannableStringBuilder(body);
if (start < 0)
start = 0;
if (start > s.length())
start = s.length();
for (Uri uri : uris) {
EntityAttachment attachment = addAttachment(context, id, uri, image, resize, privacy);