From cd9b858b540ac460af5db24fb4e45d7c0a6675e9 Mon Sep 17 00:00:00 2001 From: Nick Downing Date: Wed, 10 Jan 2024 14:48:27 +1100 Subject: [PATCH] In /ocode_vm.py in bcd_to_str(), only left-strip and only spaces not tabs etc --- ocode_vm.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) -- 2.34.1