Skip to content

Commit

Permalink
python: Fix Channel.read()
Browse files Browse the repository at this point in the history
It was using an undefined variable.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Nov 29, 2023
1 parent f924bb4 commit 82c0493
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindings/python/iio.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ def read(self, block, raw=False):
returns: type=bytearray
An array containing the samples for this channel
"""
array = bytearray(buf._length)
array = bytearray(len(block))
mytype = c_char * len(array)
c_array = mytype.from_buffer(array)
length = _c_read(self._channel, block._block, c_array, len(array), raw)
Expand Down

0 comments on commit 82c0493

Please sign in to comment.