From: Matthias Kramm <kramm@quiss.org>
Date: Thu, 15 Oct 2009 05:07:33 +0000 (-0700)
Subject: fixed bug in -s invisibletexttofront
X-Git-Tag: version-0-9-1~256
X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;h=2e5b799fa6e0fe9ef61a168e9d1d107ca7f17e32;p=swftools.git

fixed bug in -s invisibletexttofront
---

diff --git a/lib/devices/swf.c b/lib/devices/swf.c
index 179c6e2..4f691b6 100644
--- a/lib/devices/swf.c
+++ b/lib/devices/swf.c
@@ -3079,11 +3079,12 @@ static void swf_drawchar(gfxdevice_t*dev, gfxfont_t*font, int glyph, gfxcolor_t*
 	    glyph, i->swffont->id, x, y, color->r, color->g, color->b, color->a);
 
     if(color->a == 0 && i->config_invisibletexttofront) {
+	RGBA color2 = *(RGBA*)color;
 	if(i->config_flashversion>=8) {
 	    // use "multiply" blend mode
-	    color->a = color->r = color->g = color->b = 255;
+	    color2.a = color2.r = color2.g = color2.b = 255;
 	}
-	i->topchardata = charbuffer_append(i->topchardata, i->swffont, glyph, x, y, i->current_font_size, *(RGBA*)color, &i->fontmatrix);
+	i->topchardata = charbuffer_append(i->topchardata, i->swffont, glyph, x, y, i->current_font_size, color2, &i->fontmatrix);
     } else {
 	i->chardata = charbuffer_append(i->chardata, i->swffont, glyph, x, y, i->current_font_size, *(RGBA*)color, &i->fontmatrix);
     }