X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fmodules%2Fswftext.c;h=9a97d87048c19bdb817a886784b77ae2aa2a829c;hb=d3e97bc274ac9534c72c29fa466f89fe4459f6e2;hp=638be12f5fb67ec20d96fb25f702b77642a0ac70;hpb=316aa6b0e13a7c5b91e1ff9f6563f2d7afcf78b9;p=swftools.git diff --git a/lib/modules/swftext.c b/lib/modules/swftext.c index 638be12..9a97d87 100644 --- a/lib/modules/swftext.c +++ b/lib/modules/swftext.c @@ -1015,16 +1015,22 @@ int swf_TextSetInfoRecord(TAG * t, SWFFONT * font, U16 size, RGBA * color, int d swf_SetRGB(t, color); } if (dx) { - dx &= ~SET_TO_ZERO; - if(dx>32767 || dx<-32768) - fprintf(stderr, "Warning: Horizontal char position overflow: %d\n", dx); - swf_SetS16(t, dx); + if(dx == SET_TO_ZERO) { + if(dx>32767 || dx<-32768) + fprintf(stderr, "Warning: Horizontal char position overflow: %d\n", dx); + swf_SetS16(t, dx); + } else { + swf_SetS16(t, 0); + } } if (dy) { - dy &= ~SET_TO_ZERO; - if(dy>32767 || dy<-32768) - fprintf(stderr, "Warning: Vertical char position overflow: %d\n", dy); - swf_SetS16(t, dy); + if(dy == SET_TO_ZERO) { + if(dy>32767 || dy<-32768) + fprintf(stderr, "Warning: Vertical char position overflow: %d\n", dy); + swf_SetS16(t, dy); + } else { + swf_SetS16(t, 0); + } } if (font) swf_SetU16(t, size);