bitmap_t result;\r
long bufSize;\r
int index;\r
- byte count, val;\r
+ byte count, val;
\r
/* open the PCX file for reading */\r
file = fopen(filename, "rb");\r
}\r
\r
/* load the first part of the pcx file */\r
- loadPcxStage1(file, &result);\r
+ loadPcxStage1(file, &result);
\r
/* allocate the buffer */\r
- bufSize = result.width * result.height;\r
- result.data = malloc(bufSize);\r
+ bufSize = result.width * result.height;
+ result.data = malloc(bufSize); //it breaks right here~
if(!result.data) {\r
printf("Could not allocate memory for bitmap data.");\r
fclose(file);\r