From c5d32c58f9ecec5a30c825aa9e0c9b89405e0786 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 31 Aug 2016 17:48:45 -0400 Subject: [PATCH] TW-1778: Unicode strings are truncated in task description - Thanks to Andrew, bjonnh, OKOMPer, Vladimir. --- AUTHORS | 4 ++++ ChangeLog | 2 ++ src/text.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 8681889f3..52d43edde 100644 --- a/AUTHORS +++ b/AUTHORS @@ -131,6 +131,7 @@ The following submitted code, packages or analysis, and deserve special thanks: Lynoure Braakman Sebastien Badia Ran Benita + Vladimir Thanks to the following, who submitted detailed bug reports and excellent suggestions: @@ -296,3 +297,6 @@ suggestions: Ellington Santos george js E. Manuel Cerr'on Angeles + Andrew + bjonnh + OKOMper diff --git a/ChangeLog b/ChangeLog index e1b07e4db..ddd27b085 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ (thanks to Paul Beckingham) - TW-1772 Implementation of circular dependency detection is inefficient (thanks to Michael Meier). +- TW-1778 Unicode strings are truncated in task description + (thanks to Andrew, bjonnh, OKOMPer, Vladimir). - TW-1788 Closing a reopened task does not update the end time (thanks to Ralph Bean). - TW-1791 taskrc(5) manpage: spurious "pri." in rule.precedence.color diff --git a/src/text.cpp b/src/text.cpp index f5e3496be..bc8353f73 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -248,7 +248,7 @@ bool extractLine ( // Premature EOL. if (character == '\n') { - line = text.substr (offset, line_length); + line = text.substr (offset, prior_cursor - offset); offset = cursor; return true; }