aboutsummaryrefslogtreecommitdiff
path: root/uxd.c
diff options
context:
space:
mode:
Diffstat (limited to 'uxd.c')
-rw-r--r--uxd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/uxd.c b/uxd.c
index 01b4f92..0e461e0 100644
--- a/uxd.c
+++ b/uxd.c
@@ -543,11 +543,11 @@ int is_overlong(int cont_count, unsigned char *b) {
if(cont_count == 1 && b[0] <= 0xc1)
return 1;
- /* for 3 and 4 byte seqs, it's the 2nd byte that matters. */
- if(cont_count == 2 && b[1] <= 0x9f)
+ /* for 3 and 4 byte seqs, the 2nd byte matters too. */
+ if(cont_count == 2 && b[0] == 0xe0 && b[1] <= 0x9f)
return 1;
- if(cont_count == 3 && b[1] <= 0x8f)
+ if(cont_count == 3 && b[0] == 0xf0 && b[1] <= 0x8f)
return 1;
return 0;