Skip to content

Commit

Permalink
Fix UTF-8 control characters test
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Aug 16, 2023
1 parent 70d713c commit 4f9002c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 4f9002c

Please sign in to comment.