summaryrefslogtreecommitdiff
path: root/upbc/generator.cc
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2018-12-15 16:17:48 -0800
committerJoshua Haberman <jhaberman@gmail.com>2018-12-15 16:17:48 -0800
commit380558922b661499f4eb43b0463b5a73e5fe87b7 (patch)
treea4784816965ae37e72bde3983c68738d7b0d41a4 /upbc/generator.cc
parent2681a17513be312d1da924a1644f040eb8c1372a (diff)
test_encoder passes! Other tests still need to be fixed.
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