From b706aeca425ce7a664514f115029039a70f3dc3d Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 23 Oct 2001 18:33:36 +0000 Subject: [PATCH] fixed ShapeSetLine (again) --- lib/modules/swfshape.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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; -- 1.7.10.4