fix this fuzz
i forgot the prefix the otherwise encode with a zero ooops
go test fuzz v1
[]byte("\x85\x01\x00\x00")
This commit is contained in:
@@ -297,7 +297,12 @@ func RegistryEntryHolderEncoder(g *Generator, varToSet ast.Expr, dataRaw any, na
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
knownTypeName := name + "KnownType"
|
knownTypeName := name + "KnownType"
|
||||||
|
encode0statements, err := g.VisitEncoder(NumLit(0), "varint", name+"Zero")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
otherwiseEncodeStatements, err := g.VisitEncoder(Ident(knownTypeName), data.Otherwise.Type, name+"Otherwise")
|
otherwiseEncodeStatements, err := g.VisitEncoder(Ident(knownTypeName), data.Otherwise.Type, name+"Otherwise")
|
||||||
|
otherwiseEncodeStatements = append(encode0statements, otherwiseEncodeStatements...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user