Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit d14c793

Browse files
committed
fixed #45
1 parent 4c9e1ee commit d14c793

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/jota/utils/TrytesConverter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ public static String toTrytes(String inputString) {
7272
*/
7373
public static String toString(String inputTrytes) {
7474

75+
// If input length is odd, return null
76+
if (inputTrytes.length() % 2 != 0)
77+
return null;
78+
7579
StringBuilder string = new StringBuilder();
7680

7781
for (int i = 0; i < inputTrytes.length(); i += 2) {

0 commit comments

Comments
 (0)