dansanderson / picotool

Tools and Python libraries for manipulating Pico-8 game files. http://www.lexaloffle.com/pico-8.php
MIT License
367 stars 46 forks source link

luamin fails to change goto labels resulting in unrunnable code #56

Closed macsimilian closed 2 years ago

macsimilian commented 5 years ago

pluswave_after_fmt_000

macsimilian commented 5 years ago

all 3 goto labels in this cart were renamed, but their corresponding goto commands weren't

dansanderson commented 2 years ago

@macsimilian Apologies that this issue is very old. Do you still have the example that breaks this? Can you attach the cart, or paste the code, into this issue?

The intended behavior is for both the label and the goto symbol to be treated like any other symbol and appropriately renamed. Simple tests show that both the goto and the label are getting minified.

macsimilian commented 2 years ago

This is the cart that it was broken for, not sure if the exact version though. I ended up compressing space by going through and removing all the indentations.

pluswave p8

Liquidream commented 2 years ago

Just remembered that I too still seem to have experienced this issue. I had to add all labels to "keep" list in order to avoid error.

dansanderson commented 2 years ago

This is now fixed. luamin will minify labels correctly, no need to add them to the keep list. abce6967a89f055c4df602995180b45392a5b27f

Also high chars are now supported in labels (and symbols).