diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-04-28 11:53:37 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-04-28 11:53:37 +0100 |
commit | e4f11d1b748f425ece416aa1a2a9b4c9596b7cbb (patch) | |
tree | 4fda221a27457278a55e978d128b514af73eb501 /amiga/font.c | |
parent | 964183702224e68b2264844ff993b7e6ab68b587 (diff) | |
download | netsurf-e4f11d1b748f425ece416aa1a2a9b4c9596b7cbb.tar.gz netsurf-e4f11d1b748f425ece416aa1a2a9b4c9596b7cbb.tar.bz2 |
Fix a potential crash when plotting glyphs
Diffstat (limited to 'amiga/font.c')
-rwxr-xr-x | amiga/font.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/amiga/font.c b/amiga/font.c index df41301d1..e624d5677 100755 --- a/amiga/font.c +++ b/amiga/font.c @@ -584,7 +584,7 @@ int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPort *rp, if ((*char2 >= 0xD800) && (*char2 <= 0xDBFF)) { /* Don't attempt to kern a UTF-16 surrogate */ - char2 = 0; + *char2 = 0; } if(aa == false) { @@ -622,7 +622,7 @@ int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPort *rp, kern = 0; - if(char2) EObtainInfo(&ofont->olf_EEngine, + if(*char2) EObtainInfo(&ofont->olf_EEngine, OT_TextKernPair, &kern, TAG_END); @@ -632,7 +632,7 @@ int32 ami_font_plot_glyph(struct OutlineFont *ofont, struct RastPort *rp, glyphmaptag, glyph, TAG_END); - if(char2) EReleaseInfo(&ofont->olf_EEngine, + if(*char2) EReleaseInfo(&ofont->olf_EEngine, OT_TextKernPair, kern, TAG_END); } @@ -657,7 +657,7 @@ int32 ami_font_width_glyph(struct OutlineFont *ofont, if ((*char2 >= 0xD800) && (*char2 <= 0xDBFF)) { /* Don't attempt to kern a UTF-16 surrogate */ - char2 = 0; + *char2 = 0; } if(ESetInfo(&ofont->olf_EEngine, @@ -674,7 +674,7 @@ int32 ami_font_width_glyph(struct OutlineFont *ofont, kern = 0; - if(char2) { + if(*char2) { if(ESetInfo(&ofont->olf_EEngine, OT_GlyphCode, *char1, OT_GlyphCode2, *char2, @@ -687,7 +687,7 @@ int32 ami_font_width_glyph(struct OutlineFont *ofont, } char_advance = (ULONG)(((char1w - kern) * emwidth) / 65536); - if(char2) EReleaseInfo(&ofont->olf_EEngine, + if(*char2) EReleaseInfo(&ofont->olf_EEngine, OT_TextKernPair, kern, TAG_END); |