fix bytearray:insert (#594)

This commit is contained in:
MihailRis
2025-08-23 11:47:35 +03:00
committed by GitHub
parent a46aafa562
commit 25f4c7fbdd
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ local function insert(self, index, b)
if self.size + elems > self.capacity then
grow_buffer(self, elems)
end
for i=self.size, index - 1, -1 do
for i = self.size - 1, index - 1, -1 do
self.bytes[i + elems] = self.bytes[i]
end
if _type(b) == "number" then