adobe-type-tools / afdko

Adobe Font Development Kit for OpenType
https://adobe-type-tools.github.io/afdko/
Other
1.06k stars 167 forks source link

[hotconv] reset dsigCnt in hotReuse() so subsequent conversions add full stub 'DSIG' table. #1648

Closed NSGod closed 1 year ago

NSGod commented 1 year ago

Description

This is a patch to fix bug #1647. Basically, I moved the static dsigCount variable outside the refillDSIG() function, and reset it in hotReuse().

Checklist:

I think I finally have all local tests working except for test_infinite_loop_with_dflt_lookups_bug965(). That test fails before and after my changes, so I don't think it'd be related.

Unlike the previous bugs I've encountered , this strikes me as one that could probably use a test? The thing is, as I've mentioned elsewhere, I'm not sure if it's possible to trigger this bug using existing tools, and I'm still in the process of learning Python enough to write a test. If you think it warrants a test and could create one, that would certainly help in my learning process.