From e6a088f90dcbe467e2916d79362b9de88ff66f4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Fri, 15 Mar 2024 13:45:07 +0000 Subject: [PATCH] wrong variable --- flow/pua/flatbuffers_builder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flow/pua/flatbuffers_builder.go b/flow/pua/flatbuffers_builder.go index 024c1d0a1c..91afbccc84 100644 --- a/flow/pua/flatbuffers_builder.go +++ b/flow/pua/flatbuffers_builder.go @@ -160,7 +160,7 @@ func (b *Builder) WriteVtable(ls *lua.LState) int { } var existingVtable int - for i := len(b.ba.data) - 1; i >= 0; i-- { + for i := len(b.vtables) - 1; i >= 0; i -= 1 { vt2Offset := b.vtables[i] vt2Start := len(b.ba.data) - vt2Offset vt2Len := uint16n.UnpackU64(b.ba.data[vt2Start:]) @@ -176,7 +176,7 @@ func (b *Builder) WriteVtable(ls *lua.LState) int { } if existingVtable == 0 { - for i := len(b.currentVT) - 1; i >= 0; i-- { + for i := len(b.currentVT) - 1; i >= 0; i -= 1 { var off uint16 if b.currentVT[i] != 0 { off = uint16(objectOffset - b.currentVT[i])