From 2a5ce4f2b89b266074b95db86df667d0db455108 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 6 Sep 2020 14:38:46 +0200 Subject: [PATCH] solve the bcs table index use inconsistency https://github.com/eclipse-ee4j/mail/pull/475 --- app/src/main/java/javax/mail/internet/MimeMultipart.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/javax/mail/internet/MimeMultipart.java b/app/src/main/java/javax/mail/internet/MimeMultipart.java index 2af69a7092..e71fc91d50 100644 --- a/app/src/main/java/javax/mail/internet/MimeMultipart.java +++ b/app/src/main/java/javax/mail/internet/MimeMultipart.java @@ -820,7 +820,7 @@ public class MimeMultipart extends Multipart { */ // compute how many bytes we can skip - int skip = Math.max(i + 1 - bcs[inbuf[i] & 0x7f], gss[i]); + int skip = Math.max(i + 1 - bcs[inbuf[i] & 0xff], gss[i]); // want to keep at least two characters if (skip < 2) { // only skipping one byte, save one byte