summaryrefslogtreecommitdiff
path: root/xmake/core/base/bytes.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-04-06 22:32:10 +0800
committerruki <[email protected]>2022-04-06 22:32:10 +0800
commit60c78f84bcef3be6e5a906cd10fe6bc0d7b0c77c (patch)
treebc7f7a54641fd3bf57c1558483b911807d4066d9 /xmake/core/base/bytes.lua
parentadb0d9cf10af42d491371fbf2504d9de8af159fd (diff)
improve stream
Diffstat (limited to 'xmake/core/base/bytes.lua')
-rw-r--r--xmake/core/base/bytes.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/base/bytes.lua b/xmake/core/base/bytes.lua
index 199d071f0..b95260237 100644
--- a/xmake/core/base/bytes.lua
+++ b/xmake/core/base/bytes.lua
@@ -97,7 +97,7 @@ function _instance.new(...)
os.raise("incorrect bounds(%d-%d) for bytes(...)!", start, last)
end
instance._SIZE = last - start + 1
- instance._CDATA = b:cdata() -1 + start
+ instance._CDATA = b:cdata() - 1 + start
instance._REF = b -- keep lua ref for GC
instance._MANAGED = false
instance._READONLY = b:readonly()