From 75496efd3e4c2f34295e0e59003ab064e68be2f9 Mon Sep 17 00:00:00 2001 From: dankl Date: Mon, 4 Nov 2019 00:02:56 +0100 Subject: [PATCH] Fixed stuffing code to full byte --- .../src/main/kotlin/net/dankito/fints/tan/FlickerCanvas.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/tan/FlickerCanvas.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/tan/FlickerCanvas.kt index 0e00d2ef..a0e6e240 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/tan/FlickerCanvas.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/tan/FlickerCanvas.kt @@ -44,6 +44,9 @@ open class FlickerCanvas(var code: String) { /* prepend synchronization identifier */ code = "0FFF" + code + if (code.length % 2 != 0) { + code += "F" + } for (i in 0 until code.length step 2) { bits[code[i + 1]]?.let { bitarray.add(mutableListOf(*it.toTypedArray())) }