fix: IndexError

This commit is contained in:
xtaodada 2022-07-27 15:05:09 +08:00
parent a8b9d4fa78
commit 0b9930e4f3
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -60,6 +60,8 @@ def cut_text(old_str, cut):
i = 0
non_wrap_str = []
for p in str_list:
if not p:
continue
if p[-1] == "\n":
p = p[:-1]
non_wrap_str.append(p)