From d7530ae9619d3c4a21034fa44e9a1ad101bc25b7 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Thu, 5 Dec 2019 14:28:02 -0800 Subject: [PATCH] Fixed enum min/max values not properly escaped. Change-Id: I503fbfaff1d2579807ca71a07cca8363dff75e52 --- src/idl_gen_cpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/idl_gen_cpp.cpp b/src/idl_gen_cpp.cpp index 214b8c5d9..7a467928d 100644 --- a/src/idl_gen_cpp.cpp +++ b/src/idl_gen_cpp.cpp @@ -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}}\\"; } }