IoeCmcomc / MCDatapacker

A Minecraft datapack maker and editor for 1.15 – 1.20.4 data packs
Apache License 2.0
61 stars 1 forks source link

typing # on the first character of code crashes the program #7

Closed ScienceKit closed 1 year ago

ScienceKit commented 1 year ago

in my datapack i was writing away, when i did the following: some command here that does something and is valid

then some place in the text i press enter: some command here that |does something and is valid

Now my cursor is bottom left. Then i go to the first line to edit something: |some command here that does something and is valid

That's all well and good, but when i comment that first line, instead of this:

|some command here that

does something and is valid

it just crashes. !!! This only happens on the first line and only when i make a comment, off the top of my head i think the loop to color the text green give the string.find() function an adress of 0 and the exit condition is i == str.find() but str. find give -1 and it just keeps going and going into leaked memory image

IoeCmcomc commented 1 year ago

Duplicate of #6

IoeCmcomc commented 1 year ago

Despite being a duplicate, I will keep this issue open until a new version is released.