git » fp-git.git » commit 3499499

initialization

author ecalot
2006-06-16 05:29:54 UTC
committer ecalot
2006-06-16 05:29:54 UTC
parent 24025db7694131802c61a4c9699fc62fc45ed626

initialization

PR/src/lib/object/image/image256.c +2 -0

diff --git a/PR/src/lib/object/image/image256.c b/PR/src/lib/object/image/image256.c
index 2cc3ec5..9d63bc6 100644
--- a/PR/src/lib/object/image/image256.c
+++ b/PR/src/lib/object/image/image256.c
@@ -129,6 +129,7 @@ int mExpandGraphic256(const unsigned char* data,tImage *image, int dataSizeInByt
 	switch (((image->type>>4)&7)+1) {
 	case 8:
 		image->widthInBytes=(image->width);
+		imageSizeInBytes=image->widthInBytes*image->height;
 		break;
 	case 4: 
 		image->widthInBytes=(image->width+1)/2;
@@ -209,6 +210,7 @@ int pop2decompress(const unsigned char* input, int inputSize, int verify, unsign
 
 	*output=malloc(40000);
 	lineO=*output;
+	for (aux=0;aux<*outputSize;aux++) (*output)[aux]=0; /* initialize the array (TODO: only for debug, in fixed images it won't be necessary) */
 	*outputSize=0;
 
 	osCheck=array2short(input)-6;