From: kramm Date: Mon, 22 Nov 2004 19:16:47 +0000 (+0000) Subject: don't write out "S16 out of bounds) warnings in case of SET_TO_ZERO is X-Git-Tag: release-0-6-3~151 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=251500bcdc5f8e159ad6793ccbe545abde19bc40 don't write out "S16 out of bounds) warnings in case of SET_TO_ZERO is passed as coordinate to swf_TextSetInfoRecord(). --- diff --git a/lib/modules/swftext.c b/lib/modules/swftext.c index 69edf6c..06d3eea 100644 --- a/lib/modules/swftext.c +++ b/lib/modules/swftext.c @@ -1015,11 +1015,13 @@ 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 (dy) { + dy &= ~SET_TO_ZERO; if(dy>32767 || dy<-32768) fprintf(stderr, "Warning: Vertical char position overflow: %d\n", dy); swf_SetS16(t, dy);