Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2879

TMemoryBuffer: using lua string in wrong way

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.3
    • Lua - Library
    • None

    Description

      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 +.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            roger Roger Meier
            winsweet winsweet
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment