]> git.tdb.fi Git - ttf2png.git/blobdiff - ttf2png.c
Bump version to 1.0
[ttf2png.git] / ttf2png.c
index e25434945e41fa44d906ebfd1c5babc431b791a3..a9896c39f9e2c737d0f7d1576199f8a0fee0239c 100644 (file)
--- a/ttf2png.c
+++ b/ttf2png.c
@@ -273,7 +273,7 @@ int main(int argc, char **argv)
 
 void usage()
 {
-       printf("ttf2png - True Type Font to PNG converter\n"
+       printf("ttf2png 1.0 - True Type Font to PNG converter\n"
                "Copyright (c) 2004-2008  Mikko Rasa, Mikkosoft Productions\n"
                "Distributed under the GNU General Public License\n\n");
 
@@ -320,14 +320,14 @@ void *alloc_image_data(size_t a, size_t b)
                        a += c;
                if(a<c)
                {
-                       fprintf(stderr, "Cannot allocate %d kbytes of memory for image\n", c/1024*b);
+                       fprintf(stderr, "Cannot allocate %lu kbytes of memory for image\n", (unsigned long)(c/1024*b));
                        return NULL;
                }
                b /= 2;
        }
        ptr = malloc(a);
        if(!ptr)
-               fprintf(stderr, "Cannot allocate %d kbytes of memory for image\n", a/1024*b);
+               fprintf(stderr, "Cannot allocate %lu kbytes of memory for image\n", (unsigned long)(a/1024*b));
        return ptr;
 }
 
@@ -727,7 +727,7 @@ int save_png(const char *fn, const Image *image, char alpha)
        png_info   *pngi;
        png_byte   **rows;
        unsigned   i;
-       png_byte   *data2;
+       png_byte   *data2 = 0;
        int        color;
 
        if(!strcmp(fn, "-"))