erasure: Coding blocks during encoding were garbage, fixes #21

This commit is contained in:
Harshavardhana
2014-11-13 21:48:04 -08:00
parent c39c51328e
commit 6a6dac8365
5 changed files with 35 additions and 37 deletions
+1
View File
@@ -94,6 +94,7 @@ func (e *Encoder) Decode(chunks [][]byte, length int) ([]byte, error) {
for i := range chunks {
pointers[i] = &chunks[i][0]
}
data := (**C.uchar)(unsafe.Pointer(&pointers[:k][0]))
coding := (**C.uchar)(unsafe.Pointer(&pointers[k:][0]))