Fixed: units_to_bytes returning 0 if input value <10 and in bits

pull/233/head
aristocratos 2021-01-03 23:37:21 +01:00
parent 10aea340ba
commit 8041ca1afb
1 changed files with 1 additions and 1 deletions

View File

@ -4747,8 +4747,8 @@ def units_to_bytes(value: str) -> int:
elif value.isdigit():
value_i = int(value)
if bit: value_i = round(value_i / 8)
out = int(value_i) << (10 * mult)
if bit: out = round(out / 8)
except ValueError:
out = 0
return out