Skip to content

Commit 144af50

Browse files
committed
Fix
1 parent 8a8a1aa commit 144af50

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/thealgorithms/ciphers/ADFGVXCipher.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ public String decrypt(String ciphertext, String key) {
9999
private String columnarTransposition(String text, String key) {
100100
int numRows = (int) Math.ceil((double) text.length() / key.length());
101101
char[][] table = new char[numRows][key.length()];
102-
for (char[] row : table) Arrays.fill(row, '_'); // Fill empty cells with underscores
102+
for (char[] row : table) { // Fill empty cells with underscores
103+
Arrays.fill(row, '_');
104+
}
103105

104106
// Populate the table row by row
105107
for (int i = 0; i < text.length(); i++) {

0 commit comments

Comments
 (0)