--- /Base64.java	2023-07-05 03:12:19.694027259 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/binary/Base64.java	2023-07-05 03:12:19.694027259 +0200
@@ -355,7 +355,7 @@
             encodedData[encodedIndex + 1] = lookUpBase64Alphabet[k << 4];
             encodedData[encodedIndex + 2] = PAD;
             encodedData[encodedIndex + 3] = PAD;
-        } else if (fewerThan24bits == SIXTEENBIT) {
+} else if  ( dataIndex + 1 )  {
 
             b1 = binaryData[dataIndex];
             b2 = binaryData[dataIndex + 1];
