• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Révision28928 (tree)
l'heure2020-06-20 01:51:43
Auteurstefankueng

Message de Log

Fix handling utf8-BOMs in TortoiseBlame, also add a test file.

Change Summary

Modification

--- trunk/src/Changelog.txt (revision 28927)
+++ trunk/src/Changelog.txt (revision 28928)
@@ -4,6 +4,8 @@
44 - BUG: Bugtraq links in log dialog didn't
55 work anymore. (Stefan)
66 - BUG: various problems with dark theme. (Stefan)
7+- BUG: TortoiseBlame showd NUL chars if the
8+ file contained an utf8 BOM. (Stefan)
79
810 Version 1.14.0
911 See the release notes: https://tortoisesvn.net/tsvn_1.14_releasenotes.html
--- trunk/src/TortoiseBlame/TortoiseBlame.cpp (revision 28927)
+++ trunk/src/TortoiseBlame/TortoiseBlame.cpp (revision 28928)
@@ -432,10 +432,12 @@
432432 if (((unsigned char)lineptr[0] == 0xEF) && ((unsigned char)lineptr[1] == 0xBB) && ((unsigned char)lineptr[2] == 0xBF))
433433 {
434434 lineptr += 3;
435+ strLen -= 3;
435436 }
436437 if (((unsigned char)lineptr[0] == 0xBB) && ((unsigned char)lineptr[1] == 0xEF) && ((unsigned char)lineptr[2] == 0xBF))
437438 {
438439 lineptr += 3;
440+ strLen -= 3;
439441 }
440442 // check each line for illegal utf8 sequences. If one is found, we treat
441443 // the file as ASCII, otherwise we assume an UTF8 file.
Afficher sur ancien navigateur de dépôt.