\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
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