summaryrefslogtreecommitdiff
path: root/upbc/generator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'upbc/generator.cc')
-rw-r--r--upbc/generator.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/upbc/generator.cc b/upbc/generator.cc
index 2760069..5843597 100644
--- a/upbc/generator.cc
+++ b/upbc/generator.cc
@@ -362,7 +362,7 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output
fullname);
output(
"UPB_INLINE $0_oneofcases $1_$2_case(const $1* msg) { "
- "return UPB_FIELD_AT(msg, int, $3); }\n"
+ "return ($0_oneofcases)UPB_FIELD_AT(msg, int32_t, $3); }\n"
"\n",
fullname, msgname, oneof->name(),
GetSizeInit(layout.GetOneofCaseOffset(oneof)));
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback