McfDebugger_Mod icon indicating copy to clipboard operation
McfDebugger_Mod copied to clipboard

Empty comments break the function

Open hanmindev opened this issue 3 years ago • 1 comments

If a function has an empty comment (only one #), the function will break.

For example:

# this is a comment
/say hi

is a valid function

# this is a comment
#
/say hi

is not a valid function.

It works in vanilla minecraft, but not with the mod.

hanmindev avatar Nov 06 '21 18:11 hanmindev

Sorry for the inconvenience. The failure of reading is caused by

if (stringReader.canRead() && (stringReader.peek() != '#'|| string.substring(0,2).equals("#@"))) {

in FakeCommandFunctionCreate.java ,line 31 where

string.substring(0,2)

throws an exception when there is only one character. I'll publish a new release as soon as possible.

hugeBlack avatar Nov 18 '21 13:11 hugeBlack