Skip to content

Commit

Permalink
Fix a bug with BytesField
Browse files Browse the repository at this point in the history
  • Loading branch information
mherrmann committed Dec 22, 2016
1 parent 953023a commit 6398b06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypxlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def _serialize_to(self, value, pxval_value):

class BytesField(Field):
def _deserialize(self, pxval_value):
return pxval_value.str.val.data
return pxval_value.str.val.data[:pxval_value.str.len]
def _serialize_to(self, value, pxval_value):
pxval_value.str.val = value
pxval_value.str.len = len(value)
Expand Down

0 comments on commit 6398b06

Please sign in to comment.