summaryrefslogtreecommitdiff
path: root/xmake/modules/private/service/stream.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/private/service/stream.lua')
-rw-r--r--xmake/modules/private/service/stream.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/private/service/stream.lua b/xmake/modules/private/service/stream.lua
index 5460a7cb9..226ee22e0 100644
--- a/xmake/modules/private/service/stream.lua
+++ b/xmake/modules/private/service/stream.lua
@@ -144,7 +144,7 @@ function stream:recv(buff, size)
-- move left cache to head
cache_size = real - leftsize
if cache_size > 0 then
- cache:move(leftsize, cache_size)
+ cache:move(leftsize + 1, real)
end
self._RCACHE_SIZE = cache_size
return buff:slice(1, buffsize)