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:
b8bf167
)
added overflow checking for text coordinates.
author
kramm
<kramm>
Tue, 14 Sep 2004 16:26:58 +0000
(16:26 +0000)
committer
kramm
<kramm>
Tue, 14 Sep 2004 16:26:58 +0000
(16:26 +0000)
lib/modules/swftext.c
patch
|
blob
|
history
diff --git
a/lib/modules/swftext.c
b/lib/modules/swftext.c
index
c4b162f
..
a01e10b
100644
(file)
--- a/
lib/modules/swftext.c
+++ b/
lib/modules/swftext.c
@@
-1020,10
+1020,16
@@
int swf_TextSetInfoRecord(TAG * t, SWFFONT * font, U16 size, RGBA * color, int d
else
swf_SetRGB(t, color);
}
- if (dx)
+ if (dx) {
+ if(dx>32767 || dx<-32768)
+ fprintf(stderr, "Warning: Horizontal char position overflow: %d\n", dx);
swf_SetS16(t, dx);
- if (dy)
+ }
+ if (dy) {
+ if(dy>32767 || dy<-32768)
+ fprintf(stderr, "Warning: Vertical char position overflow: %d\n", dy);
swf_SetS16(t, dy);
+ }
if (font)
swf_SetU16(t, size);