Skip to content

Issue #8562: Fix odd length import/export for .ani metadata

Alx Sa requested to merge alxsa-ani-fix into master

This patch attempts to fix an issue noted in #8562 (closed). .ani file metadata (Author and Cursor names) must be an even length for Windows to recognize the file as valid. If the data itself is an odd length, then an extra 0x00 of padding is added per attribute (see attached sample images). Otherwise, the animation won't be visible when used as a cursor.

This patch adds a data length check to both the import and export code. It then reads in an "extra" byte or adds one, respectively. It also makes minor adjustments to the header size calculations to account for the potentially new byte(s).

Sample .ani files:




Merge request reports