]> 4ch.mooo.com Git - 16.git/commitdiff
attempted~
authorsparky4 <sparky4@cock.li>
Thu, 5 Nov 2015 20:52:00 +0000 (14:52 -0600)
committersparky4 <sparky4@cock.li>
Thu, 5 Nov 2015 20:52:00 +0000 (14:52 -0600)
src/lib/modex16/planar16.c

index 2615d2dedd79ed7d12b66533a519a7b17be702ec..3ed90c08b088c305ed2f60c04c040320eb960e10 100755 (executable)
@@ -61,13 +61,12 @@ static void loadPcxStage1(FILE *file, planar_buf_t *result) {
 \r
        /* make sure this  is 8bpp */\r
        if(head.bpp != 8) {\r
-               printf("I only know how to handle 8bpp pcx files!\n");\r
+               fprintf(stderr, "I only know how to handle 8bpp pcx files!\n");\r
                fclose(file);\r
-               exit(-2);\r
+               //exit(-2);\r
        }\r
 }\r
 \r
-\r
 static void loadPcxPalette(FILE *file, planar_buf_t *result) {\r
        byte val;\r
        int index;\r
@@ -111,7 +110,7 @@ planar_buf_t planarLoadPcx(char *filename)
        loadPcxStage1(file, &result);\r
 \r
        /* allocate the buffer */\r
-       bufSize = (/*(dword)*/result.pwidth * result.height);\r
+       bufSize = (/*(dword)*/result.width * result.height);\r
        result = *planar_buf_alloc(result.width, result.height);\r
        if(!result.plane[0]) {\r
                fprintf(stderr, "Could not allocate memory for bitmap data.");\r