mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Fix typo in decode_utf8 tests.
The test in question was supposed to contain the spurious UTF-8 encoding that 0xD800 would have if it were not a surrogate. But the final continuation character 0x80 was instead 0x00. The test passed anyway, because ED A0 was regarded as a truncated sequence, instead of ED A0 80 being regarded as an illegal encoding of a surrogate, and both return the same output!
This commit is contained in:
parent
834b58e39b
commit
d89f2bfc55
@ -128,7 +128,7 @@ int main(void)
|
||||
|
||||
/* Endpoints of the surrogate range */
|
||||
DOTEST("\xED\x9F\xBF", 0xD7FF);
|
||||
DOTEST("\xED\xA0\x00", 0xFFFD); /* would be 0xD800 */
|
||||
DOTEST("\xED\xA0\x80", 0xFFFD); /* would be 0xD800 */
|
||||
DOTEST("\xED\xBF\xBF", 0xFFFD); /* would be 0xDFFF */
|
||||
DOTEST("\xEE\x80\x80", 0xE000);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user