From 9c8d7a6c44b0eb22ac77ca6ca5c7c29edd5f685e Mon Sep 17 00:00:00 2001 From: Shane Garrett Date: Thu, 10 Aug 2017 20:55:06 -0400 Subject: cython: Fix Node.to_bin() decode Don't convert the string to UTF-8, just bytes. Fixes #109. --- cython/plist.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cython/plist.pyx b/cython/plist.pyx index b148687..f6696d6 100644 --- a/cython/plist.pyx +++ b/cython/plist.pyx @@ -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) -- cgit v1.1-32-gdbae