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 bb29041..68996a9 100644
--- a/upbc/generator.cc
+++ b/upbc/generator.cc
@@ -521,7 +521,7 @@ void WriteSource(const protobuf::FileDescriptor* file, Output& output) {
}
if (MessageLayout::HasHasbit(field)) {
- presence = absl::StrCat(layout.GetHasbitIndex(field) + 1);
+ presence = absl::StrCat(layout.GetHasbitIndex(field));
} else if (field->containing_oneof()) {
MessageLayout::Size case_offset =
layout.GetOneofCaseOffset(field->containing_oneof());
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback