maziac/DeZog

Regression: can't use $00 syntax on breakpoints or console

Closed this issue · 5 comments

remy commented

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:

  1. Start debugging
  2. In the debug console type: -mv $c000 $ff
  3. See error (screenshot below)

Expected behavior

This was/is working in 2.0.3

Screenshots

Screenshot 2021-01-05 at 17 42 27

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…

remy commented

Not tested it yet, but it could be this commit

Yes, that's it. The regex was broken. I corrected it on 'develop' branch.

remy commented

Theory:

This is the difference in the utility.ts commit that tweaked the regexp:

Screenshot 2021-01-05 at 18 06 05

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.

remy commented

Works perfectly - thank you 🙏