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/08/31 20:47:43 UTC

[thrift] branch master updated: THRIFT-5262 Fix a encoding struct bug in the compact protocol implementation to lua Client: lua Patch: longzhiri

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 21b3e46  THRIFT-5262 Fix a encoding struct bug in the compact protocol implementation to lua Client: lua Patch: longzhiri <pe...@gmail.com>
21b3e46 is described below

commit 21b3e46993005e86b05714e3806ee9eb53a1d0af
Author: longzhiri <pe...@gmail.com>
AuthorDate: Sat Aug 8 15:24:10 2020 +0800

    THRIFT-5262 Fix a encoding struct bug in the compact protocol implementation to lua
    Client: lua
    Patch: longzhiri <pe...@gmail.com>
    
    This closes #2214
---
 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 8e7db8e..ca488dc 100644
--- a/lib/lua/TCompactProtocol.lua
+++ b/lib/lua/TCompactProtocol.lua
@@ -118,8 +118,8 @@ function TCompactProtocol:writeMessageEnd()
 end
 
 function TCompactProtocol:writeStructBegin(name)
-  self.lastFieldIndex = self.lastFieldIndex + 1
   self.lastField[self.lastFieldIndex] = self.lastFieldId
+  self.lastFieldIndex = self.lastFieldIndex + 1
   self.lastFieldId = 0
 end