Menu

#5 fails with multiple .sng files on the command line

open
nobody
None
5
2016-01-10
2005-10-14
Anonymous
No

From Debian bug #333893:

On Friday 14 October 2005 04:19, Aaron Crane wrote:

When given multiple .sng files on the command line, sng
will successfully
compile the first one, but subsequent files produce the
error message
"illegal repeated chunk" for the first (IHDR) chunk in the
file. sng is
treating the previous file's IHDR chunk as the previous
occurrence of
this chunk.

Fix: reset every chunk's seen-count when processing
each file. Patch
attached.

I've attached the patch from that bug.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Debian bug #333893 patch

    --- sngc.c.orig 2003-11-15 19:40:22.000000000 +0000
    +++ sngc.c 2005-10-14 10:54:55.494052742 +0100
    @@ -1769,6 +1769,16 @@

     write_transform_options = PNG_TRANSFORM_IDENTITY;
    
    • / initialize per-input-file chunk properties /
    • {
    • chunkprops *pp;
      +
    • for (pp = properties;
    • pp < properties + sizeof(properties)/sizeof(chunkprops);
    • pp++)
    • pp->count = 0;
    • }
      +
      / interpret the following chunk specifications /
      prevchunk = NONE;
      while (get_token())
     
  • Max Horn

    Max Horn - 2016-01-10

    Thanks a lot. A slight variation of your fix is in the repository now, and this should (finally!) be fixed in 1.1.0 (after only 10 years... ahem)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.