| commit | c31645c4b3e3ad6047271037a6760298c74b2538 | [log] [tgz] |
|---|---|---|
| author | David Symonds <dsymonds@golang.org> | Sat Jun 22 17:57:36 2013 +1000 |
| committer | David Symonds <dsymonds@golang.org> | Sat Jun 22 17:57:36 2013 +1000 |
| tree | 51674e81626b4e1a7a3fd26f52239f3295cc82a3 | |
| parent | 2ce8ed485f701935d0375594026a68121faf01f5 [diff] [blame] |
goprotobuf: Make edge-case int32 encoding more compact, and the same as C++. Fixes #39. R=r CC=golang-dev https://codereview.appspot.com/10461043
diff --git a/proto/encode.go b/proto/encode.go index 8ba3935..9d592cd 100644 --- a/proto/encode.go +++ b/proto/encode.go
@@ -235,7 +235,7 @@ } x := word32_Get(v) o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(int32(x))) + p.valEnc(o, uint64(x)) return nil }