aboutsummaryrefslogtreecommitdiff
path: root/uxd.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-12-18 04:41:34 -0500
committerB. Watson <urchlay@slackware.uk>2024-12-18 05:31:38 -0500
commitccf7537e33044c163df46b7097303e18d2c46a04 (patch)
tree1620187471fb401b42ba192befa55e5c9c9dba7a /uxd.c
parent88cad591cdf0668a69632650ea7ef9ca9ee530a1 (diff)
downloaduxd-ccf7537e33044c163df46b7097303e18d2c46a04.tar.gz
fix derpage in is_overlong()
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;