Fixed a warning when compiling
This commit is contained in:
parent
739825cbeb
commit
39c0960d96
|
@ -480,8 +480,8 @@ static GdkPixbuf * _do_pixbuf(Tasks * tasks, Window window)
|
||||||
unsigned long cnt = 0;
|
unsigned long cnt = 0;
|
||||||
unsigned long * buf = NULL;
|
unsigned long * buf = NULL;
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
unsigned long width;
|
long width;
|
||||||
unsigned long height;
|
long height;
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
unsigned char * pixbuf;
|
unsigned char * pixbuf;
|
||||||
unsigned long j;
|
unsigned long j;
|
||||||
|
@ -496,7 +496,7 @@ static GdkPixbuf * _do_pixbuf(Tasks * tasks, Window window)
|
||||||
height = buf[i + 1];
|
height = buf[i + 1];
|
||||||
if(i + 2 + (width * height) > cnt)
|
if(i + 2 + (width * height) > cnt)
|
||||||
break;
|
break;
|
||||||
if(width == 0 || height == 0 || width != height)
|
if(width <= 0 || height <= 0 || width != height)
|
||||||
continue;
|
continue;
|
||||||
size = width * height * 4;
|
size = width * height * 4;
|
||||||
if((pixbuf = malloc(size)) == NULL)
|
if((pixbuf = malloc(size)) == NULL)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user