diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-09-04 19:16:14 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-09-04 19:16:14 +0000 |
commit | 61ae94eba1c6de192db37c22668ca557237a1c95 (patch) | |
tree | eefbfd3d1939604f58887c6a7408e60c82a647a6 /src | |
parent | 61741d41eb4a868099dd1118a7fa01fe89add0de (diff) | |
download | libparserutils-61ae94eba1c6de192db37c22668ca557237a1c95.tar.gz libparserutils-61ae94eba1c6de192db37c22668ca557237a1c95.tar.bz2 |
Fix stupid.
Testcase for cp1252. Currently fails because of spurious nonsense at the end of the output. May be a test driver bug.
svn path=/trunk/libparserutils/; revision=5237
Diffstat (limited to 'src')
-rw-r--r-- | src/charset/codecs/codec_8859.c | 4 | ||||
-rw-r--r-- | src/charset/codecs/codec_ext8.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/charset/codecs/codec_8859.c b/src/charset/codecs/codec_8859.c index ef63d4f..5384729 100644 --- a/src/charset/codecs/codec_8859.c +++ b/src/charset/codecs/codec_8859.c @@ -563,10 +563,10 @@ parserutils_error charset_8859_to_ucs4(charset_8859_codec *c, if (*s < 0x80) { out = *s; } else if (*s >= 0xA0) { - if (c->table[*s] == 0xFFFF) + if (c->table[*s - 0xA0] == 0xFFFF) return PARSERUTILS_INVALID; - out = c->table[*s]; + out = c->table[*s - 0xA0]; } else { return PARSERUTILS_INVALID; } diff --git a/src/charset/codecs/codec_ext8.c b/src/charset/codecs/codec_ext8.c index d85f87b..5d21024 100644 --- a/src/charset/codecs/codec_ext8.c +++ b/src/charset/codecs/codec_ext8.c @@ -557,10 +557,10 @@ parserutils_error charset_ext8_to_ucs4(charset_ext8_codec *c, if (*s < 0x80) { out = *s; } else { - if (c->table[*s] == 0xFFFF) + if (c->table[*s - 0x80] == 0xFFFF) return PARSERUTILS_INVALID; - out = c->table[*s]; + out = c->table[*s - 0x80]; } *ucs4 = out; |