Regression: can't use $00 syntax on breakpoints or console
Closed this issue · 5 comments
Describe the bug
Using $
as a hex prefix value does not work, i.e. I can't refer to 255 as $ff
anymore.
To Reproduce
Steps to reproduce the behavior:
- Start debugging
- In the debug console type:
-mv $c000 $ff
- See error (screenshot below)
Expected behavior
This was/is working in 2.0.3
Screenshots
Version etc. (please complete the following information):
- DeZog SW Version: 2.1.0 (pre-release)
- OS: macOS Big Sur
- Remote: zsim
Side note, I'm looking through the diff on the develop
branch to see if I can see where the change is but thus far can't see it. I wonder if it's somewhere in src/misc/utility.ts
file as the error in the debug console refers to a eval fail and I suspect this line which suggests the replaceVarsWithValues
has a regression in it - but again, I can't see this in the diff…
Not tested it yet, but it could be this commit
Yes, that's it. The regex was broken. I corrected it on 'develop' branch.
Theory:
This is the difference in the utility.ts commit that tweaked the regexp:
So previously when $ff
went in, it came out the same, but the new regexp returns ff
.
That value then goes into Utility.parseValue
(here) and the value is no longer prefixed with $
and it doesn't match a label, so the value is returned as is - which eventually throws an error further down the chain.
Please try the new v2.1.3:
https://github.com/maziac/DeZog/releases/tag/v2.1.3
Works perfectly - thank you 🙏