Merge pull request #1454 from thomasvl/enum_defaults

Proper checking of enum with non zero default