mirror of
https://github.com/nqtronix/fifofast.git
synced 2026-02-06 00:52:43 +08:00
Fixed level increment
In the original Pull Request, when the buffer needed to wrap the write, the level was incremented by `tocopy` bytes again instead of only `btw` (bytes left to copy after wrap).
This commit is contained in:
committed by
GitHub
parent
6ad61300e0
commit
5cd061bf6f
@@ -394,7 +394,7 @@ do{ \
|
||||
if (btw > 0) { \
|
||||
memcpy(&_id.data[_id.write], (newdata)+tocopy, btw); \
|
||||
_id.write = btw; \
|
||||
_id.level += tocopy; \
|
||||
_id.level += btw; \
|
||||
} \
|
||||
}while(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user