You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2020/12/22 01:11:52 UTC

[thrift] branch master updated: THRIFT-5325: Fix Lua library writeStructEnd() in TCompactProtocol Client: lua Patch: Jeffrey Han

This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 13662dd  THRIFT-5325: Fix Lua library writeStructEnd() in TCompactProtocol Client: lua Patch: Jeffrey Han
13662dd is described below

commit 13662dd7be9aa3ffdbbc49bd1c3b77c4549569bd
Author: Jeffrey Han <je...@fb.com>
AuthorDate: Thu Dec 17 13:12:10 2020 -0800

    THRIFT-5325: Fix Lua library writeStructEnd() in TCompactProtocol
    Client: lua
    Patch: Jeffrey Han
    
    This closes #2297
---
 lib/lua/TCompactProtocol.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/lua/TCompactProtocol.lua b/lib/lua/TCompactProtocol.lua
index 0ebccac..8ec7b3a 100644
--- a/lib/lua/TCompactProtocol.lua
+++ b/lib/lua/TCompactProtocol.lua
@@ -124,8 +124,8 @@ function TCompactProtocol:writeStructBegin(name)
 end
 
 function TCompactProtocol:writeStructEnd()
-  self.lastFieldId = self.lastField[self.lastFieldIndex]
   self.lastFieldIndex = self.lastFieldIndex - 1
+  self.lastFieldId = self.lastField[self.lastFieldIndex]
 end
 
 function TCompactProtocol:writeFieldBegin(name, ttype, id)