Fixed enum min/max values not properly escaped.

Change-Id: I503fbfaff1d2579807ca71a07cca8363dff75e52
This commit is contained in:
Wouter van Oortmerssen 2019-12-05 14:28:02 -08:00
parent 99d11e279f
commit d7530ae961
1 changed files with 2 additions and 2 deletions

View File

@ -1010,11 +1010,11 @@ class CppGenerator : public BaseGenerator {
code_ += "{{SEP}} {{KEY}} = {{VALUE}}\\";
} else { // MIN & MAX are useless for bit_flags
code_.SetValue("KEY", GenEnumValDecl(enum_def, "MIN"));
code_.SetValue("VALUE", GenEnumValDecl(enum_def, minv->name));
code_.SetValue("VALUE", GenEnumValDecl(enum_def, Name(*minv)));
code_ += "{{SEP}} {{KEY}} = {{VALUE}}\\";
code_.SetValue("KEY", GenEnumValDecl(enum_def, "MAX"));
code_.SetValue("VALUE", GenEnumValDecl(enum_def, maxv->name));
code_.SetValue("VALUE", GenEnumValDecl(enum_def, Name(*maxv)));
code_ += "{{SEP}} {{KEY}} = {{VALUE}}\\";
}
}