- int s=t;
- if(s>=16) //FIXME
- s=15;
- gradient1->ratios[s] = swf_GetU8(tag);
- swf_GetRGBA(tag, &gradient1->rgba[s]);
- gradient2->ratios[s] = swf_GetU8(tag);
- swf_GetRGBA(tag, &gradient2->rgba[s]);
+ U8 ratio;
+ RGBA color;
+
+ ratio = swf_GetU8(tag);
+ swf_GetRGBA(tag, &color);
+ if(gradient1) {
+ gradient1->ratios[t] = ratio;
+ gradient1->rgba[t] = color;
+ }
+
+ ratio = swf_GetU8(tag);
+ swf_GetRGBA(tag, &color);
+ if(gradient2) {
+ gradient2->ratios[t] = ratio;
+ gradient2->rgba[t] = color;
+ }