From 5154400b641a46b27a35e90d97aca725e541a14a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Matos?= Date: Fri, 18 Sep 2020 01:09:36 +0100 Subject: [PATCH] Avoid crash when string only has one char --- lib/lyx2lyx/lyx_2_4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index 3fd876c826..9c724061f7 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -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)