diff options
author | Stef Walter <stef@memberwebs.com> | 2004-09-01 00:34:52 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-09-01 00:34:52 +0000 |
commit | 0374bb25185762b455b5073b29c53c29393e7914 (patch) | |
tree | 577f05f0db4545eb8c926302562f9525d613a53c /src | |
parent | 773899d2a8a3c955956154e7e9f7ad144367039d (diff) |
Low ANSI chars are used in RTF for wierd things :(
Diffstat (limited to 'src')
-rw-r--r-- | src/rtfparser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rtfparser.cpp b/src/rtfparser.cpp index 576441c..595d404 100644 --- a/src/rtfparser.cpp +++ b/src/rtfparser.cpp @@ -45,11 +45,11 @@ const wchar_t kAnsiToUnicode[] = { - /* Invalid */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* Invalid, but used for wierd things in RTF anyway :( */ + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, + 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, + 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F, /* Low 7 bit, same */ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, @@ -315,7 +315,7 @@ bool RtfParser::parseHexChar(int num, bool ansi) { ASSERT((sizeof(kAnsiToUnicode) / sizeof(kAnsiToUnicode[0])) == 256); - if(val < 0 || val >= 256 || !kAnsiToUnicode[val]) + if(val < 0 || val >= 256) m_parseErrors.append("invalid ansi char: " + data + "\n"); else sendData(kAnsiToUnicode[val]); |