diff --git a/src/core/operations/Base64.js b/src/core/operations/Base64.js
index 069a2b63..c6d9ce6c 100755
--- a/src/core/operations/Base64.js
+++ b/src/core/operations/Base64.js
@@ -221,15 +221,15 @@ const Base64 = {
offset0 = "" +
staticSection + "" +
- "" + offset0.substr(offset0.length - 3, 1) + "" +
- "" + offset0.substr(offset0.length - 2) + "";
+ "" + offset0.substr(offset0.length - 3, 1) + "" +
+ "" + offset0.substr(offset0.length - 2) + "";
} else if (len0 % 4 === 3) {
staticSection = offset0.slice(0, -2);
offset0 = "" +
staticSection + "" +
- "" + offset0.substr(offset0.length - 2, 1) + "" +
- "" + offset0.substr(offset0.length - 1) + "";
+ "" + offset0.substr(offset0.length - 2, 1) + "" +
+ "" + offset0.substr(offset0.length - 1) + "";
} else {
staticSection = offset0;
offset0 = "" + offset1.substr(0, 1) + "" +
- "" + offset1.substr(1, 1) + "";
+ padding = "" + offset1.substr(0, 1) + "" +
+ "" + offset1.substr(1, 1) + "";
offset1 = offset1.substr(2);
if (len1 % 4 === 2) {
staticSection = offset1.slice(0, -3);
offset1 = padding + "" +
staticSection + "" +
- "" + offset1.substr(offset1.length - 3, 1) + "" +
- "" + offset1.substr(offset1.length - 2) + "";
+ "" + offset1.substr(offset1.length - 3, 1) + "" +
+ "" + offset1.substr(offset1.length - 2) + "";
} else if (len1 % 4 === 3) {
staticSection = offset1.slice(0, -2);
offset1 = padding + "" +
staticSection + "" +
- "" + offset1.substr(offset1.length - 2, 1) + "" +
- "" + offset1.substr(offset1.length - 1) + "";
+ "" + offset1.substr(offset1.length - 2, 1) + "" +
+ "" + offset1.substr(offset1.length - 1) + "";
} else {
staticSection = offset1;
offset1 = padding + "" + offset2.substr(0, 2) + "" +
- "" + offset2.substr(2, 1) + "";
+ padding = "" + offset2.substr(0, 2) + "" +
+ "" + offset2.substr(2, 1) + "";
offset2 = offset2.substr(3);
if (len2 % 4 === 2) {
staticSection = offset2.slice(0, -3);
offset2 = padding + "" +
staticSection + "" +
- "" + offset2.substr(offset2.length - 3, 1) + "" +
- "" + offset2.substr(offset2.length - 2) + "";
+ "" + offset2.substr(offset2.length - 3, 1) + "" +
+ "" + offset2.substr(offset2.length - 2) + "";
} else if (len2 % 4 === 3) {
staticSection = offset2.slice(0, -2);
offset2 = padding + "" +
staticSection + "" +
- "" + offset2.substr(offset2.length - 2, 1) + "" +
- "" + offset2.substr(offset2.length - 1) + "";
+ "" + offset2.substr(offset2.length - 2, 1) + "" +
+ "" + offset2.substr(offset2.length - 1) + "";
} else {
staticSection = offset2;
offset2 = padding + "green could change if the input is surrounded by more data." +
- "\nCharacters highlighted in red are for padding purposes only." +
+ return (showVariable ? "Characters highlighted in green could change if the input is surrounded by more data." +
+ "\nCharacters highlighted in red are for padding purposes only." +
"\nUnhighlighted characters are static." +
"\nHover over the static sections to see what they decode to on their own.\n" +
"\nOffset 0: " + offset0 +