From 64d29bb27c4b8dadfd473d279d6d5fdbe35f5b5e Mon Sep 17 00:00:00 2001 From: itec Date: Fri, 25 Dec 2020 23:02:07 +0100 Subject: [PATCH] Fixed idx for compatibility --- banana/libbanana.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/banana/libbanana.py b/banana/libbanana.py index d326e65..35287ee 100644 --- a/banana/libbanana.py +++ b/banana/libbanana.py @@ -30,7 +30,7 @@ class Codec: r = v % len(alphabets[idx]) v = int(v / len(alphabets[idx])) st = alphabets[idx][r] + st - idx = (idx - 1) % numalpha + idx = (idx + numalpha - 1) % numalpha length += 1 return st