- TW-1359 "one-two-three" in description triggers Malformed ID error.
This commit is contained in:
Paul Beckingham 2014-07-13 23:40:40 -04:00
parent aca193799a
commit 75fe62149d
7 changed files with 14 additions and 7 deletions

View file

@ -127,6 +127,7 @@
- TW-1341 confirmation config setting should apply to config command as well - TW-1341 confirmation config setting should apply to config command as well
(thanks to Charles Ulrich). (thanks to Charles Ulrich).
- TW-1345 taskrc.5 manpage errors. - TW-1345 taskrc.5 manpage errors.
- TW-1359 "one-two-three" in description triggers Malformed ID error.
- TW-1360 color.until directive missing. - TW-1360 color.until directive missing.
- TW-1361 Strange results with complex filter (thanks to Jim B). - TW-1361 Strange results with complex filter (thanks to Jim B).
- TW-1366 In diagnostics it's called 'Cert', and in config it's called - TW-1366 In diagnostics it's called 'Cert', and in config it's called

View file

@ -1199,6 +1199,12 @@ void Parser::findIdSequence ()
if (terms.size () == 1) if (terms.size () == 1)
{ {
if (! digitsOnly (terms[0]))
{
not_an_id = true;
break;
}
Nibbler n (terms[0]); Nibbler n (terms[0]);
int id; int id;
if (n.getUnsignedInt (id) && if (n.getUnsignedInt (id) &&
@ -1214,6 +1220,13 @@ void Parser::findIdSequence ()
} }
else if (terms.size () == 2) else if (terms.size () == 2)
{ {
if (! digitsOnly (terms[0]) ||
! digitsOnly (terms[1]))
{
not_an_id = true;
break;
}
Nibbler n_min (terms[0]); Nibbler n_min (terms[0]);
Nibbler n_max (terms[1]); Nibbler n_max (terms[1]);
int id_min; int id_min;
@ -1234,8 +1247,6 @@ void Parser::findIdSequence ()
break; break;
} }
} }
else
throw std::string (STRING_PARSER_MALFORMED_ID);
} }
if (not_an_id) if (not_an_id)

View file

@ -106,7 +106,6 @@
#define STRING_PARSER_OVERRIDE_RC "Configuration override rc.{1}:{2}" #define STRING_PARSER_OVERRIDE_RC "Configuration override rc.{1}:{2}"
#define STRING_PARSER_UNKNOWN_ATTMOD "Error: unrecognized attribute modifier '{1}'." #define STRING_PARSER_UNKNOWN_ATTMOD "Error: unrecognized attribute modifier '{1}'."
#define STRING_PARSER_RANGE_INVERTED "Inverted range 'high-low' instead of 'low-high'" #define STRING_PARSER_RANGE_INVERTED "Inverted range 'high-low' instead of 'low-high'"
#define STRING_PARSER_MALFORMED_ID "Malformed ID."
#define STRING_PARSER_UUID_AFTER_COMMA "Unrecognized UUID after comma." #define STRING_PARSER_UUID_AFTER_COMMA "Unrecognized UUID after comma."
#define STRING_PARSER_ALTERNATE_RC "Using alternate .taskrc file {1}" #define STRING_PARSER_ALTERNATE_RC "Using alternate .taskrc file {1}"
#define STRING_PARSER_ALTERNATE_DATA "Using alternate data.location {1}" #define STRING_PARSER_ALTERNATE_DATA "Using alternate data.location {1}"

View file

@ -106,7 +106,6 @@
#define STRING_PARSER_OVERRIDE_RC "Sobrescritura de configuración rc.{1}:{2}" #define STRING_PARSER_OVERRIDE_RC "Sobrescritura de configuración rc.{1}:{2}"
#define STRING_PARSER_UNKNOWN_ATTMOD "Error: modificador de atributo no reconocido '{1}'." #define STRING_PARSER_UNKNOWN_ATTMOD "Error: modificador de atributo no reconocido '{1}'."
#define STRING_PARSER_RANGE_INVERTED "Rango invertido 'alto-bajo' en vez de 'bajo-alto'" #define STRING_PARSER_RANGE_INVERTED "Rango invertido 'alto-bajo' en vez de 'bajo-alto'"
#define STRING_PARSER_MALFORMED_ID "ID incorrecto."
#define STRING_PARSER_UUID_AFTER_COMMA "UUID no reconocido tras coma." #define STRING_PARSER_UUID_AFTER_COMMA "UUID no reconocido tras coma."
#define STRING_PARSER_ALTERNATE_RC "Usando el archivo .taskrc alternativo {1}" #define STRING_PARSER_ALTERNATE_RC "Usando el archivo .taskrc alternativo {1}"
#define STRING_PARSER_ALTERNATE_DATA "Usando data.location alternativa {1}" #define STRING_PARSER_ALTERNATE_DATA "Usando data.location alternativa {1}"

View file

@ -106,7 +106,6 @@
#define STRING_PARSER_OVERRIDE_RC "Configuration écrasée : rc.{1}:{2}" #define STRING_PARSER_OVERRIDE_RC "Configuration écrasée : rc.{1}:{2}"
#define STRING_PARSER_UNKNOWN_ATTMOD "Erreur : attribut de modification non reconnu '{1}'." #define STRING_PARSER_UNKNOWN_ATTMOD "Erreur : attribut de modification non reconnu '{1}'."
#define STRING_PARSER_RANGE_INVERTED "Inverted range 'high-low' instead of 'low-high'" #define STRING_PARSER_RANGE_INVERTED "Inverted range 'high-low' instead of 'low-high'"
#define STRING_PARSER_MALFORMED_ID "ID mal formé."
#define STRING_PARSER_UUID_AFTER_COMMA "UUID non reconnu après la virgule." #define STRING_PARSER_UUID_AFTER_COMMA "UUID non reconnu après la virgule."
#define STRING_PARSER_ALTERNATE_RC "Utilise un fichier .taskrc alternatif : {1}" #define STRING_PARSER_ALTERNATE_RC "Utilise un fichier .taskrc alternatif : {1}"
#define STRING_PARSER_ALTERNATE_DATA "Utilise une data.location alternative : {1}" #define STRING_PARSER_ALTERNATE_DATA "Utilise une data.location alternative : {1}"

View file

@ -107,7 +107,6 @@
#define STRING_PARSER_OVERRIDE_RC "Modifica configurazione rc.{1}:{2}" #define STRING_PARSER_OVERRIDE_RC "Modifica configurazione rc.{1}:{2}"
#define STRING_PARSER_UNKNOWN_ATTMOD "Errore: modificatore di attributo non riconosciuto '{1}'." #define STRING_PARSER_UNKNOWN_ATTMOD "Errore: modificatore di attributo non riconosciuto '{1}'."
#define STRING_PARSER_RANGE_INVERTED "Intervallo invertito 'alto-basso' invece di 'basso-alto'" #define STRING_PARSER_RANGE_INVERTED "Intervallo invertito 'alto-basso' invece di 'basso-alto'"
#define STRING_PARSER_MALFORMED_ID "ID malformato."
#define STRING_PARSER_UUID_AFTER_COMMA "UUID non riconosciuto dopo la virgola." #define STRING_PARSER_UUID_AFTER_COMMA "UUID non riconosciuto dopo la virgola."
#define STRING_PARSER_ALTERNATE_RC "Uso del file .taskrc alternativo {1}" #define STRING_PARSER_ALTERNATE_RC "Uso del file .taskrc alternativo {1}"
#define STRING_PARSER_ALTERNATE_DATA "Uso di data.location alternativa {1}" #define STRING_PARSER_ALTERNATE_DATA "Uso di data.location alternativa {1}"

View file

@ -106,7 +106,6 @@
#define STRING_PARSER_OVERRIDE_RC "Alteração de configuração rc.{1}:{2}" #define STRING_PARSER_OVERRIDE_RC "Alteração de configuração rc.{1}:{2}"
#define STRING_PARSER_UNKNOWN_ATTMOD "Erro: modificador de atributo não reconhecido '{1}'." #define STRING_PARSER_UNKNOWN_ATTMOD "Erro: modificador de atributo não reconhecido '{1}'."
#define STRING_PARSER_RANGE_INVERTED "Intervalo invertido 'alta-baixa' em vez de 'baixa-alta'" #define STRING_PARSER_RANGE_INVERTED "Intervalo invertido 'alta-baixa' em vez de 'baixa-alta'"
#define STRING_PARSER_MALFORMED_ID "ID malformado."
#define STRING_PARSER_UUID_AFTER_COMMA "UUID não reconhecido após a vírgula." #define STRING_PARSER_UUID_AFTER_COMMA "UUID não reconhecido após a vírgula."
#define STRING_PARSER_ALTERNATE_RC "Usando o ficheiro .taskrc alternativo {1}" #define STRING_PARSER_ALTERNATE_RC "Usando o ficheiro .taskrc alternativo {1}"
#define STRING_PARSER_ALTERNATE_DATA "Usando data.location alternativa {1}" #define STRING_PARSER_ALTERNATE_DATA "Usando data.location alternativa {1}"