Skip to content

Commit 8913185

Browse files
vmarkovtsevtcalmant
authored andcommitted
Fix char deserialization
1 parent 99ecc41 commit 8913185

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

javaobj.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,11 @@ def _read_value(self, field_type, ident, name=""):
10341034
res = bool(val)
10351035
elif field_type == self.TYPE_BYTE:
10361036
(res,) = self._readStruct(">b")
1037+
elif field_type == self.TYPE_CHAR:
1038+
# TYPE_CHAR is defined by the serialization specification
1039+
# but not used in the implementation, so this is
1040+
# a hypothetical code
1041+
res = bytes(self._readStruct(">bb")).decode("utf-16-be")
10371042
elif field_type == self.TYPE_SHORT:
10381043
(res,) = self._readStruct(">h")
10391044
elif field_type == self.TYPE_INTEGER:

0 commit comments

Comments
 (0)