Problems with Enum Flags feature

If you have a enum like so:

enum <uint16> {
	b6 = (1 << 6),
	b7 = (1 << 7),
	b8 = (1 << 8)
} x <edit=flags>;

Enabling b6 will work fine, whereas enabling b7 will give an error that the value is out of range. Enabling b8 will just silently fail. Additionally, enabling b6 only and trying to disable it (so that the value of x is 0) will also give an out of range error.

If you change the type from uint16 to int16, enabling b7 will also enable b8 (and all bits higher), as if it was an 8-bit signed integer with the sign bit enabled being assigned to a 16-bit signed integer.

This behaviour has been confirmed in v16.0beta2.

Thanks for the report. I think we have this fixed now and the fix should go up with 16.0beta3 which should be within the next few days.

Graeme
SweetScape Software

16.0beta3 is now up which should fix the problem: 010 Editor - Beta Release

Graeme
SweetScape Software