qrdecode: fix error where float was used as a string index

We needed to do an integer division not a float division.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
This commit is contained in:
Steven Noonan 2016-08-26 03:56:39 -07:00
parent 4f33c9fd63
commit fc0554d711

View File

@ -263,7 +263,7 @@ def parse_bits(bits, version):
while l > 0: while l > 0:
if l >= 2: if l >= 2:
num, bits = bits_to_int(bits[:11]), bits[11:] num, bits = bits_to_int(bits[:11]), bits[11:]
buf += ALPHANUM[num / 45] buf += ALPHANUM[num // 45]
buf += ALPHANUM[num % 45] buf += ALPHANUM[num % 45]
l -= 2 l -= 2
else: else: