gmqcc
gmqcc copied to clipboard
enum : flag uses incorrect incrementation with =
When compiling an enumeration with the flag attribute, using the = syntax to set the current constant will cause the next variant to be offset by one.
Code to reproduce:
enum : flag {
FL_FLY,
FL_SWIM,
FL_CLIENT = 8,
FL_INWATER, // will be 18 ((8+1)*2), not 16 (8*2)
};
The line that breaks this: https://github.com/graphitemaster/gmqcc/blob/master/parser.cpp#L3717