- 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);