Commit 9c8d7a6c authored by Shane Garrett's avatar Shane Garrett Committed by Nikias Bassen

cython: Fix Node.to_bin() decode

Don't convert the string to UTF-8, just bytes.
Fixes #109.
parent ac3be565
......@@ -116,7 +116,7 @@ cdef class Node:
plist_to_bin(self._c_node, &out, &length)
try:
return _from_string_and_size(out, length)
return bytes(out[:length])
finally:
if out != NULL:
libc.stdlib.free(out)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment