mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
examples/sinewave: Refactoring (return the copied bytes)
This commit is contained in:
parent
808f512a7d
commit
79b5712410
@ -83,7 +83,7 @@ func (s *stream) Read(buf []byte) (int, error) {
|
|||||||
if origBuf != nil {
|
if origBuf != nil {
|
||||||
n := copy(origBuf, buf)
|
n := copy(origBuf, buf)
|
||||||
s.remaining = buf[n:]
|
s.remaining = buf[n:]
|
||||||
return len(origBuf), nil
|
return n, nil
|
||||||
}
|
}
|
||||||
return len(buf), nil
|
return len(buf), nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user