EgonOlsen71 / basicv2

A Commodore (CBM) BASIC V2 interpreter/compiler written in Java
https://egonolsen71.github.io/basicv2/
The Unlicense
86 stars 15 forks source link

"{cm-*}" triggers exception #28

Closed nippur72 closed 5 years ago

nippur72 commented 5 years ago

This line of code triggers a Java exception:

1 print "{cm-*}"
Running assembler...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.lang.String.charAt(Unknown Source)
        at com.sixtyfour.parser.assembly.AssemblyParser.getBinaryData(AssemblyParser.java:249)
        at com.sixtyfour.Assembler.compile(Assembler.java:206)
        at com.sixtyfour.cbmnative.shell.MoSpeedCL.main(MoSpeedCL.java:201)

cm-asterisk does work though.

EgonOlsen71 commented 5 years ago

Should be fixed now. It was treating the * as an indicator for the multiple occurance of a character, not as a character itself.