Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
fix move to start bug
Browse files Browse the repository at this point in the history
  • Loading branch information
maralla committed Sep 3, 2014
1 parent 8885660 commit 12eb98a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions thriftpy/transport/cytransport.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ cdef class TCyBuffer(object):
self.buf = NULL

cdef void move_to_start(self):
if self.cur != 0 and self.data_size > 0:
memmove(self.buf, self.buf + self.cur, self.data_size)
self.cur = 0
memmove(self.buf, self.buf + self.cur, self.data_size)
self.cur = 0

cdef void clean(self):
self.cur = 0
Expand Down

0 comments on commit 12eb98a

Please # to comment.