From 585d291aeb68d3922f97418d9f4258be845e0f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdulkadir=20AKTA=C5=9E?= Date: Sun, 10 Mar 2024 19:43:09 +0300 Subject: [PATCH 1/2] Fix "length" issue --- client/cl_dataview.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cl_dataview.lua b/client/cl_dataview.lua index 4026509..21b20cb 100644 --- a/client/cl_dataview.lua +++ b/client/cl_dataview.lua @@ -182,7 +182,7 @@ SetFixed = function(self, offset, value, code) local size = self.length - newoff + 1 fmt[#fmt + 1] = "c" .. tostring(size) - values[#values + 1] = self.blob:sub(newoff, size) + values[#values + 1] = self.blob:sub(newoff, size.length) end self.blob = string.pack(table.concat(fmt, ""), table.unpack(values)) @@ -220,4 +220,4 @@ for label,datatype in pairs(DataView.Types) do end end -return DataView,DataStream \ No newline at end of file +return DataView,DataStream From 54319a983c9e907a6777512a8f105d298fbc2f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdulkadir=20AKTA=C5=9E?= Date: Wed, 18 Sep 2024 14:05:50 +0300 Subject: [PATCH 2/2] Update cl_dataview.lua --- client/cl_dataview.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cl_dataview.lua b/client/cl_dataview.lua index 21b20cb..b40f0cc 100644 --- a/client/cl_dataview.lua +++ b/client/cl_dataview.lua @@ -182,7 +182,7 @@ SetFixed = function(self, offset, value, code) local size = self.length - newoff + 1 fmt[#fmt + 1] = "c" .. tostring(size) - values[#values + 1] = self.blob:sub(newoff, size.length) + values[#values + 1] = self.blob:sub(newoff, self.length) end self.blob = string.pack(table.concat(fmt, ""), table.unpack(values))