From 2753fc350507c424493451faa7e6415032ad2ef5 Mon Sep 17 00:00:00 2001 From: Imple Lee <80144331+ImpleLee@users.noreply.github.com> Date: Fri, 19 Mar 2021 18:39:24 +0800 Subject: [PATCH] remove a `goto` --- parts/gametoolfunc.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/parts/gametoolfunc.lua b/parts/gametoolfunc.lua index 10357cc7..7872419a 100644 --- a/parts/gametoolfunc.lua +++ b/parts/gametoolfunc.lua @@ -911,24 +911,22 @@ function pumpRecording(str,L) while p<=len do --Read delta time code=0 - ::nextByte1:: local b=byte(str,p) - if b>=128 then + while b>=128 do code=code*128+b-128 p=p+1 - goto nextByte1 + b=byte(str,p) end curFrm=curFrm+code*128+b L[#L+1]=curFrm p=p+1 local event=0 - ::nextByte2:: b=byte(str,p) - if b>=128 then + while b>=128 do event=event*128+b-128 p=p+1 - goto nextByte2 + b=byte(str,p) end L[#L+1]=event*128+b p=p+1