From ceaba87ba35585681cf1d04fa02e0d2efcb50bba Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 21 Jun 2008 16:38:01 -0400 Subject: [PATCH] - Fixed bug causing seg faults for Ubuntu users. --- ChangeLog | 9 ++++++--- html/task.html | 6 ++++-- html/troubleshooting.html | 11 ++++++----- src/Config.cpp | 8 ++++---- src/Config.h | 8 ++++---- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38b210058..42512909f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,11 +12,14 @@ represents a feature release, and the Z represents a patch. - Recurring tasks -1.3.1 (?) - + Bug: "showage" configuration variable should apply to all reports, not - just the ones based on "list" +1.3.1 (6/21/2008) + New configuration variable, "defaultwidth" that determines the width of tables when ncurses support is not available + + Bug: "showage" configuration variable should apply to all reports, not + just the ones based on "list" + + Bug: Fixed segmentation faults on Ubuntu when the "dateformat" + configuration variables was missing. This was a code bug, and should + have affected more platforms. ------ reality ----------------------------------- diff --git a/html/task.html b/html/task.html index d4f59987f..653b0f719 100644 --- a/html/task.html +++ b/html/task.html @@ -48,10 +48,12 @@

diff --git a/html/troubleshooting.html b/html/troubleshooting.html index 1cd2977a9..7dacebd2e 100644 --- a/html/troubleshooting.html +++ b/html/troubleshooting.html @@ -27,14 +27,15 @@

Segmentation Fault for certain commands

- Task 1.3.0 and earlier has been generating segmentation faults - after upgrading to a new version of task. This is mostly - occurring for Ubuntu users. + Upgrading task to version 1.1.0, 1.2.0 and 1.3.0 can cause + segmentation faults. This is mostly occurring for Ubuntu users, + although there is no reason for it to be limited to Ubuntu.

- While a fix is being worked on, there is a workaround. - Add the following line to your ~/.taskrc file: + Task 1.3.1 fixes this bug, but there is a workaround for users + of earlier versions. Add the following line to your ~/.taskrc + file:

dateformat=m/d/Y
diff --git a/src/Config.cpp b/src/Config.cpp index 78a377957..8d5ffdb48 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -157,7 +157,7 @@ void Config::createDefault (const std::string& file) //////////////////////////////////////////////////////////////////////////////// // Return the configuration value given the specified key. -const std::string& Config::get (const char* key) +const std::string Config::get (const char* key) { return this->get (std::string (key)); } @@ -165,7 +165,7 @@ const std::string& Config::get (const char* key) //////////////////////////////////////////////////////////////////////////////// // Return the configuration value given the specified key. If a default_value // is present, it will be the returned value in the event of a missing key. -const std::string& Config::get ( +const std::string Config::get ( const char* key, const char* default_value) { @@ -174,7 +174,7 @@ const std::string& Config::get ( //////////////////////////////////////////////////////////////////////////////// // Return the configuration value given the specified key. -const std::string& Config::get (const std::string& key) +const std::string Config::get (const std::string& key) { return (*this)[key]; } @@ -182,7 +182,7 @@ const std::string& Config::get (const std::string& key) //////////////////////////////////////////////////////////////////////////////// // Return the configuration value given the specified key. If a default_value // is present, it will be the returned value in the event of a missing key. -const std::string& Config::get ( +const std::string Config::get ( const std::string& key, const std::string& default_value) { diff --git a/src/Config.h b/src/Config.h index d8f8dd940..4488ec468 100644 --- a/src/Config.h +++ b/src/Config.h @@ -40,10 +40,10 @@ public: bool load (const std::string&); void createDefault (const std::string&); - const std::string& get (const char*); - const std::string& get (const char*, const char*); - const std::string& get (const std::string&); - const std::string& get (const std::string&, const std::string&); + const std::string get (const char*); + const std::string get (const char*, const char*); + const std::string get (const std::string&); + const std::string get (const std::string&, const std::string&); bool get (const std::string&, bool); int get (const std::string&, const int); double get (const std::string&, const double);