mirror of
https://github.com/nqtronix/fifofast.git
synced 2026-08-18 00:58:13 +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:
+1
-1
@@ -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