diff options
Diffstat (limited to 'src/modules/filters/utf8nfc.cpp')
-rw-r--r-- | src/modules/filters/utf8nfc.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/filters/utf8nfc.cpp b/src/modules/filters/utf8nfc.cpp index df9e090..861a291 100644 --- a/src/modules/filters/utf8nfc.cpp +++ b/src/modules/filters/utf8nfc.cpp @@ -25,6 +25,8 @@ UTF8NFC::~UTF8NFC() { char UTF8NFC::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module) { + if ((unsigned long)key < 2) // hack, we're en(1)/de(0)ciphering + return -1; int32_t len = strlen(text) * 2; source = new UChar[len + 1]; //each char could become a surrogate pair |