public
/
BCPLCTSS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4b3dbe
)
In /ocode_vm.py in bcd_to_str(), only left-strip and only spaces not tabs etc
author
Nick Downing
<nick@ndcode.org>
Wed, 10 Jan 2024 03:48:27 +0000
(14:48 +1100)
committer
Nick Downing
<nick@ndcode.org>
Wed, 10 Jan 2024 03:48:27 +0000
(14:48 +1100)
ocode_vm.py
patch
|
blob
|
history
diff --git
a/ocode_vm.py
b/ocode_vm.py
index
ed497ed
..
72f6f1f
100755
(executable)
--- 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)