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