Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

Commit

Permalink
clarified rwExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
dchenk committed Apr 18, 2018
1 parent 8483ada commit 28220fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions msgp/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ func rwArray(dst jsWriter, src *Reader) (n int, err error) {
return
}
var sz uint32
var nn int
sz, err = src.ReadArrayHeader()
if err != nil {
return
}
var nn int
comma := false
for i := uint32(0); i < sz; i++ {
if comma {
Expand Down Expand Up @@ -259,7 +259,7 @@ func rwTime(dst jsWriter, src *Reader) (int, error) {
func rwExtension(dst jsWriter, src *Reader) (n int, err error) {
et, err := src.peekExtensionType()
if err != nil {
return 0, err
return n, err // must not be shadowed
}

// Registered extensions can override the JSON encoding.
Expand Down

0 comments on commit 28220fc

Please sign in to comment.