From ccf7537e33044c163df46b7097303e18d2c46a04 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 18 Dec 2024 04:41:34 -0500 Subject: fix derpage in is_overlong() --- uxd.c | 6 +++--- 1 file 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; -- cgit v1.2.3