Fix the adler.update implementation.

This commit is contained in:
Nigel Tao committed 2017-10-19 20:45:43 +11:00
1 parent d770bf7534
commit f9cea5c17c
8 files changed
+186 -40

No files matched your search

+4
View File
@@ -273,6 +273,10 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
if err := g.writeExpr(b, n.LHS().Expr(), rp, parenthesesMandatory, depth); err != nil {
return err
}
if lTyp := n.LHS().Expr().MType(); lTyp.Decorator().Key() == t.KeyColon {
// TODO: don't assume that the slice is a slice of u8.
b.writes(".ptr")
}
b.writeb('[')
if err := g.writeExpr(b, n.RHS().Expr(), rp, parenthesesOptional, depth); err != nil {
return err