summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-04-14 23:07:14 +0800
committerruki <[email protected]>2022-04-14 23:07:14 +0800
commitcaa80ac181303850ee88d6ffd653f5acb34122de (patch)
tree78466409b6315910908c5179d74498eeb16ac142
parent1b86b29278f43b0c58d996d4aa3212b9d69815f3 (diff)
fix stream
-rw-r--r--xmake/modules/private/service/stream.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/xmake/modules/private/service/stream.lua b/xmake/modules/private/service/stream.lua
index c2709189a..408b67dc3 100644
--- a/xmake/modules/private/service/stream.lua
+++ b/xmake/modules/private/service/stream.lua
@@ -132,6 +132,7 @@ function stream:recv(buff, size)
local cache_maxn = cache:size()
if size <= cache_size then
buff:copy(cache, 1, size)
+ cache:move(size + 1, cache_size)
cache_size = cache_size - size
self._RCACHE_SIZE = cache_size
return buff:slice(1, size)