diff options
author | B. Watson <urchlay@slackware.uk> | 2024-12-18 04:41:34 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-12-18 05:31:38 -0500 |
commit | ccf7537e33044c163df46b7097303e18d2c46a04 (patch) | |
tree | 1620187471fb401b42ba192befa55e5c9c9dba7a /uxd.c | |
parent | 88cad591cdf0668a69632650ea7ef9ca9ee530a1 (diff) | |
download | uxd-ccf7537e33044c163df46b7097303e18d2c46a04.tar.gz |
fix derpage in is_overlong()
Diffstat (limited to 'uxd.c')
-rw-r--r-- | uxd.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |