X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fbitmap.c;h=e6a0adb874fbc75957aab4184efc09ff1c8e6927;hb=b5c46f5e85d6be9895fa484766867907a885439c;hp=ece5f07d3ee659563747880bd0814743e18d810f;hpb=f66b2c6a16e6f6c2c9c07a39d1855b5ea178fead;p=16.git diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index ece5f07d..e6a0adb8 100644 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -75,7 +75,7 @@ bitmapLoadPcx(char *filename) { bitmap_t result; long bufSize; int index; - byte count, val; + byte count, val; /* open the PCX file for reading */ file = fopen(filename, "rb"); @@ -85,11 +85,11 @@ bitmapLoadPcx(char *filename) { } /* load the first part of the pcx file */ - loadPcxStage1(file, &result); + loadPcxStage1(file, &result); /* allocate the buffer */ - bufSize = result.width * result.height; - result.data = malloc(bufSize); + bufSize = result.width * result.height; + result.data = malloc(bufSize); //it breaks right here~ if(!result.data) { printf("Could not allocate memory for bitmap data."); fclose(file);