git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f93c388
)
fixes in gradient parsing
author
kramm
<kramm>
Sun, 18 Mar 2007 18:28:22 +0000
(18:28 +0000)
committer
kramm
<kramm>
Sun, 18 Mar 2007 18:28:22 +0000
(18:28 +0000)
lib/rfxswf.c
patch
|
blob
|
history
diff --git
a/lib/rfxswf.c
b/lib/rfxswf.c
index
acec565
..
4b64b83
100644
(file)
--- a/
lib/rfxswf.c
+++ b/
lib/rfxswf.c
@@
-332,13
+332,13
@@
void swf_GetGradient(TAG * tag, GRADIENT * gradient, char alpha)
memset(gradient, 0, sizeof(GRADIENT));
return;
}
memset(gradient, 0, sizeof(GRADIENT));
return;
}
- U8 num = swf_GetU8(tag);
+ U8 num = swf_GetU8(tag) & 15;
if(gradient) {
gradient->num = num;
gradient->rgba = rfx_calloc(sizeof(RGBA)*gradient->num);
gradient->ratios = rfx_calloc(sizeof(gradient->ratios[0])*gradient->num);
}
if(gradient) {
gradient->num = num;
gradient->rgba = rfx_calloc(sizeof(RGBA)*gradient->num);
gradient->ratios = rfx_calloc(sizeof(gradient->ratios[0])*gradient->num);
}
- for(t=0;t<gradient->num;t++)
+ for(t=0;t<num;t++)
{
U8 ratio = swf_GetU8(tag);
RGBA color;
{
U8 ratio = swf_GetU8(tag);
RGBA color;