From d73e13d13b2efcaed061110cefddff7f48158112 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Fri, 30 Jul 2021 21:26:34 -0700 Subject: [PATCH] Allow nonzero value count when using modal (but don't read any values) --- fatamorgana/records.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fatamorgana/records.py b/fatamorgana/records.py index cdf361a..1e35e36 100644 --- a/fatamorgana/records.py +++ b/fatamorgana/records.py @@ -993,8 +993,9 @@ class Property(Record): for _ in range(value_count)] else: values = None - if u != 0: - raise InvalidDataError('Malformed property record header') +# if u != 0: +# logger.warning('Malformed property record header; requested modal' +# ' values but had nonzero count. Ignoring count.') record = Property(name, values, bool(s)) logger.debug('Record ending at 0x{:x}:\n {}'.format(stream.tell(), record)) return record