git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed typo in error message
[swftools.git]
/
lib
/
modules
/
swfshape.c
diff --git
a/lib/modules/swfshape.c
b/lib/modules/swfshape.c
index
6ef8aa2
..
b53e2e8
100644
(file)
--- a/
lib/modules/swfshape.c
+++ b/
lib/modules/swfshape.c
@@
-418,8
+418,8
@@
int swf_ShapeSetLine(TAG * t,SHAPE * s,S32 x,S32 y)
b = swf_CountBits(y,b);
if (b<2) b=2;
if(b >= 18) {
b = swf_CountBits(y,b);
if (b<2) b=2;
if(b >= 18) {
- if(b >= 18 + 4) {
- /* do not split into more than 16 segments. If the line is *that* long, something's broken */
+ 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);
return -1;
} else {
fprintf(stderr, "Warning: Line to %.2f,%.2f is too long\n", (double)x,(double)y);
return -1;
} else {
@@
-749,17
+749,26
@@
SRECT swf_GetShapeBoundingBox(SHAPE2*shape2)
void swf_Shape2Free(SHAPE2 * s)
{
SHAPELINE*line = s->lines;
void swf_Shape2Free(SHAPE2 * s)
{
SHAPELINE*line = s->lines;
+ s->lines = 0;
while(line) {
SHAPELINE*next = line->next;
while(line) {
SHAPELINE*next = line->next;
+ line->next = 0;
rfx_free(line);
line = next;
}
rfx_free(line);
line = next;
}
- if(s->linestyles)
+
+ if(s->linestyles) {
rfx_free(s->linestyles);
rfx_free(s->linestyles);
- if(s->fillstyles)
+ s->linestyles = 0;
+ }
+ if(s->fillstyles) {
rfx_free(s->fillstyles);
rfx_free(s->fillstyles);
- if(s->bbox)
+ s->fillstyles = 0;
+ }
+ if(s->bbox) {
rfx_free(s->bbox);
rfx_free(s->bbox);
+ s->bbox = 0;
+ }
}
SHAPE2* swf_Shape2Clone(SHAPE2 * s)
}
SHAPE2* swf_Shape2Clone(SHAPE2 * s)