X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswfshape.c;h=dbd6c56e1a4499395b27385768ee5c103f34836c;hb=dd195e15ca8bd13a7cce5500bd9a7d2b8c21c8aa;hp=d1366ff63861d5c05807f04a8640dc27f003e32e;hpb=60e30cf9af6734e9461e33f051822b6f2b070e06;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;