b = swf_CountBits(y,b);
if (b<2) b=2;
if(b >= 18) {
- if(b >= 18 + 6) {
+ if(b > 18 + 6) {
/* do not split into more than 64 segments. If the line is *that* long, something's broken */
- fprintf(stderr, "Warning: Line to %.2f,%.2f is too long\n", (double)x,(double)y);
+ fprintf(stderr, "Warning: Line to %.2f,%.2f is too long (%d bits)\n", (double)x,(double)y, b);
return -1;
} else {
/* split line */
if(b >= 18) {
fprintf(stderr, "Bit overflow in swf_ShapeSetCurve- %d (%d,%d,%d,%d)\n", b, ax,ay,x,y);
- b = 17;
+ return swf_ShapeSetLine(t, s, x+ax, y+ay);
}
swf_SetBits(t,2,2);