better formatting for empty char strings.

This commit is contained in:
Kelvin Sherlock 2020-08-09 00:34:05 -04:00
parent 15a232972e
commit 734f9e0056
1 changed files with 1 additions and 0 deletions

View File

@ -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 + '"'