diff --git a/piexif/_load.py b/piexif/_load.py index 6176028..a49045a 100644 --- a/piexif/_load.py +++ b/piexif/_load.py @@ -154,6 +154,8 @@ def convert_value(self, val): if length > 4: pointer = struct.unpack(self.endian_mark + "L", value)[0] data = self.tiftag[pointer: pointer+length - 1] + elif length == 1: + data = value[0:length] else: data = value[0: length - 1] elif t == TYPES.Short: # SHORT @@ -267,4 +269,4 @@ def _get_key_name_dict(exif_dict): "Interop":{TAGS["Interop"][n]["name"]:value for n, value in exif_dict["Interop"].items()}, "thumbnail":exif_dict["thumbnail"], } - return new_dict \ No newline at end of file + return new_dict