From 409b85f6f50cecbbdeca37cb471ae8279991051e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 27 Mar 2019 10:49:13 +0800 Subject: =?UTF-8?q?=E4=B8=8D=E7=9F=A5=E9=81=93=E4=B8=BA=E4=BB=80=E4=B9=88?= =?UTF-8?q?=E8=BF=99=E9=87=8C=E8=AE=A1=E6=95=B0=E4=BC=9A=E8=AE=A1=E9=94=99?= =?UTF-8?q?=EF=BC=8C=E5=85=88=E6=94=B9=E6=88=90=E8=BF=99=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/vm/multi.lua | 3 --- server/src/vm/value.lua | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'server/src') diff --git a/server/src/vm/multi.lua b/server/src/vm/multi.lua index 5079468e..809b5244 100644 --- a/server/src/vm/multi.lua +++ b/server/src/vm/multi.lua @@ -21,9 +21,6 @@ function mt:push(value, isLast) end function mt:get(index) - if index > self.len then - self.len = index - end return self[index] end diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index f0525b14..e0837d53 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -359,9 +359,9 @@ function mt:eachInfo(callback) list[#list+1] = info else self._info[srcId] = nil - self._infoCount = self._infoCount - 1 end end + self._infoCount = #list table.sort(list, function (a, b) return a._sort < b._sort end) -- cgit v1.2.3