You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/12/08 08:58:12 UTC
[jira] [Commented] (THRIFT-2879) TMemoryBuffer: using lua string in
wrong way
[ https://issues.apache.org/jira/browse/THRIFT-2879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14237576#comment-14237576 ]
ASF GitHub Bot commented on THRIFT-2879:
----------------------------------------
GitHub user winsweet opened a pull request:
https://github.com/apache/thrift/pull/308
THRIFT-2879 TMemoryBuffer: using lua string in wrong way
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/winsweet/thrift THRIFT-2879
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/308.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #308
----
commit 1c12b894885f1ca7b41cafccde1e9850ef33ef3c
Author: winsweet <wi...@gmail.com>
Date: 2014-12-08T07:51:45Z
THRIFT-2879 TMemoryBuffer: using lua string in wrong way
----
> TMemoryBuffer: using lua string in wrong way
> --------------------------------------------
>
> Key: THRIFT-2879
> URL: https://issues.apache.org/jira/browse/THRIFT-2879
> Project: Thrift
> Issue Type: Bug
> Components: Lua - Library
> Reporter: winsweet
>
> 1.
> local val = string.sub(self.buffer, self.rPos, len)
> The call string.sub(s,i,j) extracts a piece of the string s,
> from the i-th to the j-th character inclusive.
> In Lua, the first character of a string has index 1.
> 2.
> self.buffer = self.buffer + buf
> self.wPos = self.wPos + buf
> .. is the string concatenation operator in Lua, not +.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)