From 4f9002c58a02d2364ed93825009a659f178f5a45 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Sat, 1 Jul 2023 08:16:52 +0100 Subject: [PATCH] Fix UTF-8 control characters test --- test/unit/utf8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/utf8.c b/test/unit/utf8.c index c58e1529..a3f9508c 100644 --- a/test/unit/utf8.c +++ b/test/unit/utf8.c @@ -415,10 +415,10 @@ void TEST_utf8_control_characters(void) buf[1] = '\0'; utf8_helper((char *)buf, MOSQ_ERR_MALFORMED_UTF8); - /* U+007F to U+009F are two byte control characters */ + /* U+0080 to U+009F are two byte control characters */ for(i=0x80; i<0xA0; i++){ buf[0] = 0xC2; - buf[1] = (uint8_t)(i-0x80); + buf[1] = (uint8_t)i; buf[2] = '\0'; utf8_helper((char *)buf, MOSQ_ERR_MALFORMED_UTF8); }