X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswfshape.c;h=dbd6c56e1a4499395b27385768ee5c103f34836c;hb=b706aeca425ce7a664514f115029039a70f3dc3d;hp=d1366ff63861d5c05807f04a8640dc27f003e32e;hpb=146d70a76e214c66146ff4245800c5d8616159d0;p=swftools.git diff --git a/lib/modules/swfshape.c b/lib/modules/swfshape.c index d1366ff..dbd6c56 100644 --- a/lib/modules/swfshape.c +++ b/lib/modules/swfshape.c @@ -450,7 +450,9 @@ int ShapeSetLine(LPTAG t,LPSHAPE s,S32 x,S32 y) if ((!s)||((x!=0)&&(y!=0))) { b = CountBits(x,2); b = CountBits(y,b); - SetBits(t, b>=2 ? b-2 : 0, 4); + if(b<2) + b=2; + SetBits(t, b-2, 4); SetBits(t,1,1); SetBits(t,x,b); SetBits(t,y,b); @@ -463,14 +465,18 @@ int ShapeSetLine(LPTAG t,LPSHAPE s,S32 x,S32 y) if (x==0) { b = CountBits(y,2); - SetBits(t, b>=2 ? b-2 : 0, 4); + if(b<2) + b=2; + SetBits(t, b-2, 4); SetBits(t,1,2); SetBits(t,y,b); s->py += y; } else { b = CountBits(x,2); - SetBits(t, b>=2 ? b-2 : 0, 4); + if(b<2) + b=2; + SetBits(t, b-2, 4); SetBits(t,0,2); SetBits(t,x,b); s->px += x;