Fix bug come from previous commit

This commit is contained in:
inada-n 2009-12-16 22:14:13 +09:00
parent 35a4d612c9
commit bb93f093b6

View file

@ -311,8 +311,9 @@ cdef class Unpacker(object):
self.fill_buffer() self.fill_buffer()
ret = template_execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head) ret = template_execute(&self.ctx, self.buf, self.buf_tail, &self.buf_head)
if ret == 1: if ret == 1:
o = template_data(&self.ctx)
template_init(&self.ctx) template_init(&self.ctx)
return template_data(&self.ctx) return o
elif ret == 0: elif ret == 0:
if self.file_like is not None: if self.file_like is not None:
return self.unpack() return self.unpack()