From 734f9e0056ccb930e7e9bdb5edfc1622821cfadc Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 9 Aug 2020 00:34:05 -0400 Subject: [PATCH] better formatting for empty char strings. --- utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils.py b/utils.py index 7cce101..ed3f817 100644 --- a/utils.py +++ b/utils.py @@ -45,6 +45,7 @@ def format_string(bstring, quote=True): # rez "char" is a string of length 1. # 'x' is character literal which is a number. def format_char(x): + if x == 0: return '""' c = _map.get(x, chr(x)) return '"' + c + '"'