- Fixed bug where the command line was incorrectly scanned, looking
  for 'cal', '/cal', 'calendar' or '/calendar'.
This commit is contained in:
Paul Beckingham 2011-07-22 00:31:54 -04:00
parent 197524a5fc
commit ee9199b4e0

View file

@ -324,10 +324,11 @@ void Arguments::categorize ()
{ {
arg->_third = "program"; // TODO Is this a problem for expressions that do not contain a program name? arg->_third = "program"; // TODO Is this a problem for expressions that do not contain a program name?
if (arg->_first == "cal" ||
arg->_first == "calendar" || if ((arg->_first.length () >= 3 &&
arg->_first.find ("/calendar") == arg->_first.length () - 9 || arg->_first.substr (arg->_first.length () - 3) == "cal") ||
arg->_first.find ("/cal") == arg->_first.length () - 4) (arg->_first.length () >= 8 &&
arg->_first.substr (arg->_first.length () - 8) == "calendar"))
{ {
arg->_first = "calendar"; arg->_first = "calendar";
arg->_third = "command"; arg->_third = "command";