Avoid crash when string only has one char

This commit is contained in:
José Matos 2020-09-18 01:09:36 +01:00
parent d0a27e3afc
commit 5154400b64

View File

@ -3512,7 +3512,7 @@ def revert_totalheight(document):
if ms:
oldval = ms.group(1)
oldunit = ms.group(2)
if oldval[1] == ".":
if len(oldval) > 1 and oldval[1] == ".":
oldval = "0" + oldval
if oldunit in list(relative_heights.keys()):
oldval = str(float(oldval) * 100)