Skip to content

Commit

Permalink
Merge pull request #108 from lexelby/master
Browse files Browse the repository at this point in the history
fix handling of long filenames in PEC/PES
  • Loading branch information
JoshVarga committed Apr 1, 2018
2 parents 98e49a4 + 1a3faa9 commit 275eb4f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libembroidery/format-pec.c
Expand Up @@ -278,11 +278,14 @@ void writePecStitches(EmbPattern* pattern, EmbFile* file, const char* fileName)
}
binaryWriteBytes(file, "LA:", 3);
flen = (int)(dotPos - start);
if (flen > 16)
{
flen = 16;
}

while(start < dotPos)
for (i = 0; i < flen; i++)
{
binaryWriteByte(file, (unsigned char)*start);
start++;
binaryWriteByte(file, (unsigned char)*(start + i));
}
for(i = 0; i < (int)(16-flen); i++)
{
Expand Down

0 comments on commit 275eb4f

Please sign in to comment.