Portability - Fedora 9
- Using size_t as a result for std::string::find causes a silent error, reported only on Ubuntu 8. size_t is not large enough. The proper result type is std::string::size_type. This fixes a problem with the command "task old" responding with "Ambiguous commane 'old' - could be one of oldest, oldest.description, oldest.limit, oldest.sort".
This commit is contained in:
@@ -497,7 +497,7 @@ void loadCustomReports (Config& conf)
|
|||||||
if (i->substr (0, 7) == "report.")
|
if (i->substr (0, 7) == "report.")
|
||||||
{
|
{
|
||||||
std::string report = i->substr (7, std::string::npos);
|
std::string report = i->substr (7, std::string::npos);
|
||||||
size_t columns = report.find (".columns");
|
std::string::size_type columns = report.find (".columns");
|
||||||
if (columns != std::string::npos)
|
if (columns != std::string::npos)
|
||||||
{
|
{
|
||||||
report = report.substr (0, columns);
|
report = report.substr (0, columns);
|
||||||
|
|||||||
Reference in New Issue
Block a user