Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix another offset-argument bug

  • Loading branch information...
commit 91961c29bacb1e39e2e337f4145bb0bfd185ef03 1 parent a3982d2
@tych0 tych0 authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 xcb/protobj.py
View
7 xcb/protobj.py
@@ -13,7 +13,8 @@ class Union(xcb.Protobj):
class Request(xcb.Protobj):
def __init__(self, buffer, opcode, void, checked):
- xcb.Protobj.__init__(self, buffer)
+ # buffer is always generated from a StringIO, so the offset is always 0
+ xcb.Protobj.__init__(self, buffer, 0)
self.opcode = opcode
self.is_void = void
self.is_checked = checked
@@ -38,7 +39,7 @@ def __init__(self, parent, offset):
class Error(Response):
"""XCB generic error object"""
- def __init__(self, parent):
- Response.__init__(self, parent)
+ def __init__(self, parent, offset):
+ Response.__init__(self, parent, offset)
# self is a xcb_generic_error_t
(self.code, ) = struct.unpack_from('xB', self)
Please sign in to comment.
Something went wrong with that request. Please try again.