Closed jerrrykong closed 6 months ago
I debug the program flatcc. found in: external/lex/luthor.c
#ifndef lex_isctrl #include <ctype.h> #define lex_isctrl(c) ((c) < 0x20 || (unsigned char)(c) == 0x7f) #endif
When the character c is utf8, it will be a negative number. This will result in being judged as a control character. Control characters are not allowed in the syntax, resulting in compilation failure.
Fix it:
#ifndef lex_isctrl #include <ctype.h> #define lex_isctrl(c) ((unsigned char)(c) < 0x20 || (unsigned char)(c) == 0x7f) #endif
I found that is fixed. ;)
Yes, it should be fixed here: https://github.com/dvidelabs/flatcc/issues/267
I debug the program flatcc. found in: external/lex/luthor.c
When the character c is utf8, it will be a negative number. This will result in being judged as a control character. Control characters are not allowed in the syntax, resulting in compilation failure.
Fix it: