]> git.sur5r.net Git - cc65/commitdiff
does not pad the last vlir chain to n*254 bytes filesize
authorizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 26 Apr 2003 12:57:30 +0000 (12:57 +0000)
committerizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 26 Apr 2003 12:57:30 +0000 (12:57 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2075 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/grc/grc.c

index 342f25ddee5a424595419b9de4a85e1ecf2a3fb2..b59fcf90683f65bc66b811b6ad0f4d79da16d5e7 100644 (file)
@@ -104,7 +104,12 @@ int blocks,rest;
                            ++rest;
                        }
                        vlirtabt[j]=blocks+1; vlirtabs[j]=rest;
-                       fwrite(buffer,1,(blocks+1)*254,outCVT);
+                       /* do not pad the last chain - it doesn't change or break anything
+                          but filesize in bytes of .cvt will be identical to native cvt */
+                       if (i==(argc-1))
+                               fwrite(buffer,1,bytes,outCVT);
+                       else
+                               fwrite(buffer,1,(blocks+1)*254,outCVT);
                }
                ++j;
                ++i;