Sfoglia il codice sorgente

goprotobuf: Use p.isUnmarshaler consistently in decode.go.

Fixes #41.

R=crawshaw, r
CC=golang-dev
https://codereview.appspot.com/10474043
David Symonds 12 anni fa
parent
commit
4f8da8648e
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      proto/decode.go

+ 1 - 1
proto/decode.go

@@ -645,7 +645,7 @@ func (o *Buffer) dec_struct_message(p *Properties, base structPointer) (err erro
 	}
 	}
 
 
 	// If the object can unmarshal itself, let it.
 	// If the object can unmarshal itself, let it.
-	if p.isMarshaler {
+	if p.isUnmarshaler {
 		iv := structPointer_Interface(bas, p.stype)
 		iv := structPointer_Interface(bas, p.stype)
 		return iv.(Unmarshaler).Unmarshal(raw)
 		return iv.(Unmarshaler).Unmarshal(raw)
 	}
 	}