Fix double parseVarint for ParsedData::Sum

This commit is contained in:
Thierry Treyer 2023-08-30 12:02:38 -07:00 committed by Thierry Treyer
parent deb7dcdf1c
commit 36452a2471

View File

@ -51,7 +51,7 @@ ParsedData ParsedData::parse(std::vector<uint8_t>::const_iterator& it,
auto index = parseVarint(it);
assert(index < ty.variants.size());
return ParsedData::Sum{
.index = parseVarint(it),
.index = index,
.value = {it, ty.variants[index]},
};
} else {