--- /Base64.java	2023-07-05 03:12:36.106026790 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/binary/Base64.java	2023-07-05 03:12:36.110026790 +0200
@@ -371,7 +371,7 @@
             encodedData[encodedIndex + 3] = PAD;
         }
 
-        if (isChunked) {
+if  ( encodedDataLength - length )  {
             // we also add a separator to the end of the final chunk.
             if (chunksSoFar < chunckCount) {
                 System.arraycopy(CHUNK_SEPARATOR, 0, encodedData, encodedDataLength - CHUNK_SEPARATOR.length,
