diff --git a/protoc-c/c_message.cc b/protoc-c/c_message.cc index d9a6a33..c7bb844 100755 --- a/protoc-c/c_message.cc +++ b/protoc-c/c_message.cc @@ -169,7 +169,7 @@ GenerateStructDefinition(io::Printer* printer) { } printer->Print(vars, "$ucclassname$__$oneofname$_$fieldname$ = $fieldnum$$opt_comma$\n"); } - printer->Print(vars, " PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE($ucclassname$__$oneofname$)\n"); + printer->Print(vars, " PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE($ucclassname$__$oneofname$__CASE)\n"); printer->Outdent(); printer->Print(vars, "} $foneofname$Case;\n\n"); } diff --git a/t/issue220/issue220.c b/t/issue220/issue220.c index 530f755..a1b4578 100644 --- a/t/issue220/issue220.c +++ b/t/issue220/issue220.c @@ -8,6 +8,6 @@ int main(void) { assert(_MESSAGE_TYPE1__FLAG_IS_INT_SIZE == INT_MAX); assert(_MESSAGE_TYPE2__ANOTHER_FLAG_IS_INT_SIZE == INT_MAX); - assert(_TOP_LEVEL__SUBMESSAGES_IS_INT_SIZE == INT_MAX); + assert(_TOP_LEVEL__SUBMESSAGES__CASE_IS_INT_SIZE == INT_MAX); return EXIT_SUCCESS; }