diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2010-05-03 20:57:32 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2010-05-03 20:57:32 +0000 |
commit | d752fd194ceadaead9c4e67152dc4b7ab88d1510 (patch) | |
tree | 56683e5b014f90a46b1e2df4a7fe9ee1cc7ca7b8 | |
parent | 77aa68dde5989b9ab543ce4bbebdd147f83050cc (diff) | |
download | netsurf-d752fd194ceadaead9c4e67152dc4b7ab88d1510.tar.gz netsurf-d752fd194ceadaead9c4e67152dc4b7ab88d1510.tar.bz2 |
Fix loops reading too many characters
svn path=/trunk/netsurf/; revision=10548
-rw-r--r-- | amiga/font.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/amiga/font.c b/amiga/font.c index 9b4ca1f29..32e7f1213 100644 --- a/amiga/font.c +++ b/amiga/font.c @@ -111,7 +111,7 @@ bool nsfont_position_in_string(const plot_font_style_t *fstyle, *char_offset = length; - for(i=0;i<=len;i++) + for(i=0;i<len;i++) { if (*utf16 < 0xD800 || 0xDFFF < *utf16) utf16charlen = 1; @@ -218,7 +218,7 @@ bool nsfont_split(const plot_font_style_t *fstyle, *char_offset = 0; *actual_x = 0; - for(i=0;i<=len;i++) + for(i=0;i<len;i++) { utf8len = utf8_char_byte_length(string+utf8clen); @@ -348,7 +348,7 @@ ULONG ami_unicode_text(struct RastPort *rp,const char *string,ULONG length,const dy++; - for(i=0;i<=len;i++) + for(i=0;i<len;i++) { if (*utf16 < 0xD800 || 0xDFFF < *utf16) utf16charlen = 1; |