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 2019/11/03 17:59:48 UTC

[thrift] branch master updated: thrift lua TcompactProtocol bug fix

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 3adb44a  thrift lua TcompactProtocol bug fix
3adb44a is described below

commit 3adb44aa26023e4016ba844ab4bda32525d5c4fb
Author: xiongjieqing <xi...@gmail.com>
AuthorDate: Thu Sep 26 18:27:25 2019 +0800

    thrift lua TcompactProtocol bug fix
---
 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 877595a..7b75967 100644
--- a/lib/lua/TCompactProtocol.lua
+++ b/lib/lua/TCompactProtocol.lua
@@ -124,8 +124,8 @@ function TCompactProtocol:writeStructBegin(name)
 end
 
 function TCompactProtocol:writeStructEnd()
-  self.lastFieldIndex = self.lastFieldIndex - 1
   self.lastFieldId = self.lastField[self.lastFieldIndex]
+  self.lastFieldIndex = self.lastFieldIndex - 1
 end
 
 function TCompactProtocol:writeFieldBegin(name, ttype, id)