From: Nick Downing Date: Wed, 10 Jan 2024 03:48:27 +0000 (+1100) Subject: In /ocode_vm.py in bcd_to_str(), only left-strip and only spaces not tabs etc X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=cd9b858b540ac460af5db24fb4e45d7c0a6675e9;p=BCPLCTSS.git In /ocode_vm.py in bcd_to_str(), only left-strip and only spaces not tabs etc --- diff --git a/ocode_vm.py b/ocode_vm.py index ed497ed..72f6f1f 100755 --- a/ocode_vm.py +++ b/ocode_vm.py @@ -697,12 +697,15 @@ def str_to_bcd(s): return value def bcd_to_str(n): - return ''.join( + s = ''.join( [ chr(bcd_to_ascii[(n >> ((5 - i) * 6)) & 0o77]) for i in range(6) ] - ).strip().lower() + ) + while s[:1] == ' ': + s = s[1:] + return s.lower() def bcd_to_name(n1, n2): str1 = bcd_to_str(n1)