X-Git-Url: http://git.ithinksw.org/~jspiros/python-ebml.git/blobdiff_plain/d8f926028d6d4368348ad27fb2c7beef29eda9c0..e5149e5006d8d4c63f76595c977f5aa6767565d0:/ebml/core.py diff --git a/ebml/core.py b/ebml/core.py index e076c8b..8c01068 100644 --- a/ebml/core.py +++ b/ebml/core.py @@ -189,6 +189,7 @@ def read_string(stream, size): value = '' if size > 0: value = stream.read(size) + value = value.partition(chr(0))[0] return value @@ -208,6 +209,7 @@ def read_unicode_string(stream, size): value = u'' if size > 0: data = stream.read(size) + data = data.partition(chr(0))[0] value = unicode(data, 'utf_8') return value