Fixed stuffing code to full byte

This commit is contained in:
dankl 2019-11-04 00:02:56 +01:00 committed by dankito
parent cfed332f02
commit 75496efd3e
1 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,9 @@ open class FlickerCanvas(var code: String) {
/* prepend synchronization identifier */ /* prepend synchronization identifier */
code = "0FFF" + code code = "0FFF" + code
if (code.length % 2 != 0) {
code += "F"
}
for (i in 0 until code.length step 2) { for (i in 0 until code.length step 2) {
bits[code[i + 1]]?.let { bitarray.add(mutableListOf(*it.toTypedArray())) } bits[code[i + 1]]?.let { bitarray.add(mutableListOf(*it.toTypedArray())) }