fix bytewriter not writing data
This commit is contained in:
parent
7204f07861
commit
c30edb6aca
@ -2,7 +2,6 @@ package dc6
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/FooSoft/lazarus/streaming"
|
"github.com/FooSoft/lazarus/streaming"
|
||||||
|
@ -28,7 +28,9 @@ func (w *writer) Write(data []byte) (int, error) {
|
|||||||
return 0, errors.New("cannot write past end of buffer")
|
return 0, errors.New("cannot write past end of buffer")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
copy(w.data[w.offset:], data[:length])
|
||||||
w.offset += length
|
w.offset += length
|
||||||
|
|
||||||
return length, nil
|
return length, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user