Révision | 28928 (tree) |
---|---|
l'heure | 2020-06-20 01:51:43 |
Auteur | stefankueng |
Fix handling utf8-BOMs in TortoiseBlame, also add a test file.
@@ -4,6 +4,8 @@ | ||
4 | 4 | - BUG: Bugtraq links in log dialog didn't |
5 | 5 | work anymore. (Stefan) |
6 | 6 | - BUG: various problems with dark theme. (Stefan) |
7 | +- BUG: TortoiseBlame showd NUL chars if the | |
8 | + file contained an utf8 BOM. (Stefan) | |
7 | 9 | |
8 | 10 | Version 1.14.0 |
9 | 11 | See the release notes: https://tortoisesvn.net/tsvn_1.14_releasenotes.html |
@@ -432,10 +432,12 @@ | ||
432 | 432 | if (((unsigned char)lineptr[0] == 0xEF) && ((unsigned char)lineptr[1] == 0xBB) && ((unsigned char)lineptr[2] == 0xBF)) |
433 | 433 | { |
434 | 434 | lineptr += 3; |
435 | + strLen -= 3; | |
435 | 436 | } |
436 | 437 | if (((unsigned char)lineptr[0] == 0xBB) && ((unsigned char)lineptr[1] == 0xEF) && ((unsigned char)lineptr[2] == 0xBF)) |
437 | 438 | { |
438 | 439 | lineptr += 3; |
440 | + strLen -= 3; | |
439 | 441 | } |
440 | 442 | // check each line for illegal utf8 sequences. If one is found, we treat |
441 | 443 | // the file as ASCII, otherwise we assume an UTF8 file. |