初级会员

- 积分
- 170
- 金钱
- 170
- 注册时间
- 2013-10-18
- 在线时间
- 5 小时
|

楼主 |
发表于 2014-3-5 23:23:52
|
显示全部楼层
回复【4楼】正点原子:
---------------------------------
//画GIF图像的一帧
//gfile:gif文件.
//x0,y0:开始显示的坐标
u8 gif_drawimage(FIL *gfile,gif89a* gif,u16 x0,u16 y0)
{
u32 readed;
u8 res,temp;
u16 numcolors;
ImageScreenDescriptor previmg;
u8 Disposal;
int TransIndex;
u8 Introducer;
TransIndex=-1;
......
原子哥,这个函数中的变量Disposal,我看了这个函数里面,都没有对这个变量进行赋值,可是这段程序里面又要用这个
参数来进行判断,用来做函数的实参。
if(Disposal==2)
gif_clear2bkcolor(x0,y0,gif,previmg);
gif_dispimage(gfile,gif,x0+gif->gifISD.xoff,y0+gif->gifISD.yoff,TransIndex,Disposal);
局部变量不初始化,不是会随意赋值吗 |
|