Fixed JSON text output not finding symbolic names for enum value 1.

Change-Id: If3a062926dd86b95fa68ed64fc7ee2de7bc0d930
Tested: on Linux
parent 09a2999c
......@@ -235,7 +235,8 @@ struct EnumDef : public Definition {
EnumDef() : is_union(false) {}
EnumVal *ReverseLookup(int enum_idx) {
for (auto it = vals.vec.begin() + 1; it != vals.vec.end(); ++it) {
for (auto it = vals.vec.begin() + static_cast<int>(is_union);
it != vals.vec.end(); ++it) {
if ((*it)->value == enum_idx) {
return *it;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment