From 2bcbfffe1b338e65741b6064cad3c44fa5cd8ddd Mon Sep 17 00:00:00 2001 From: Tatarize Date: Thu, 30 Sep 2021 02:59:47 -0700 Subject: [PATCH] Correct Pec Reader, offset is 4 bytes earlier, and that is a jump command that should be loaded. --- pyembroidery/PecReader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyembroidery/PecReader.py b/pyembroidery/PecReader.py index 3f30dd7..8d24360 100644 --- a/pyembroidery/PecReader.py +++ b/pyembroidery/PecReader.py @@ -31,8 +31,8 @@ def read_pec(f, out, pes_chart=None): stitch_block_end = read_int_24le(f) - 5 + f.tell() # The end of this value is already 5 into the stitchblock. - # 3 bytes, '\x31\xff\xf0', 6 2-byte shorts. 15 total. - f.seek(0x0F, 1) + # 3 bytes, '\x31\xff\xf0', 4 2-byte shorts. 11 total. + f.seek(0x0B, 1) read_pec_stitches(f, out) f.seek(stitch_block_end, 0)