summaryrefslogtreecommitdiff
path: root/xmake/modules/private/service/stream.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-04-07 23:05:34 +0800
committerruki <[email protected]>2022-04-07 23:05:34 +0800
commit102b2c2b5d33b31ee7660e77fcbacac9bc5677a4 (patch)
tree104c417bed8eeb9c2e058fb368a8e2f96c1084b2 /xmake/modules/private/service/stream.lua
parente930a2db6840d9a6f501d4231889e045ba09d7d3 (diff)
fix stream recv
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)