diff --git a/piexif/_load.py b/piexif/_load.py index 6176028..8274f58 100644 --- a/piexif/_load.py +++ b/piexif/_load.py @@ -153,7 +153,8 @@ def convert_value(self, val): elif t == TYPES.Ascii: # ASCII if length > 4: pointer = struct.unpack(self.endian_mark + "L", value)[0] - data = self.tiftag[pointer: pointer+length - 1] + data = self.tiftag[pointer: pointer+length] + data = data.split(b'\x00', 1)[0] else: data = value[0: length - 1] elif t == TYPES.Short: # SHORT