diff --git a/ChangeLog b/ChangeLog index 268a53c0f..8cb1d804b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -127,6 +127,7 @@ - TW-1341 confirmation config setting should apply to config command as well (thanks to Charles Ulrich). - TW-1345 taskrc.5 manpage errors. +- TW-1359 "one-two-three" in description triggers Malformed ID error. - TW-1360 color.until directive missing. - 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 diff --git a/src/Parser.cpp b/src/Parser.cpp index e9cdaffbb..e346f1a65 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -1199,6 +1199,12 @@ void Parser::findIdSequence () if (terms.size () == 1) { + if (! digitsOnly (terms[0])) + { + not_an_id = true; + break; + } + Nibbler n (terms[0]); int id; if (n.getUnsignedInt (id) && @@ -1214,6 +1220,13 @@ void Parser::findIdSequence () } else if (terms.size () == 2) { + if (! digitsOnly (terms[0]) || + ! digitsOnly (terms[1])) + { + not_an_id = true; + break; + } + Nibbler n_min (terms[0]); Nibbler n_max (terms[1]); int id_min; @@ -1234,8 +1247,6 @@ void Parser::findIdSequence () break; } } - else - throw std::string (STRING_PARSER_MALFORMED_ID); } if (not_an_id) diff --git a/src/eng-USA.h b/src/eng-USA.h index dfbc00cf5..dda17832a 100644 --- a/src/eng-USA.h +++ b/src/eng-USA.h @@ -106,7 +106,6 @@ #define STRING_PARSER_OVERRIDE_RC "Configuration override rc.{1}:{2}" #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_MALFORMED_ID "Malformed ID." #define STRING_PARSER_UUID_AFTER_COMMA "Unrecognized UUID after comma." #define STRING_PARSER_ALTERNATE_RC "Using alternate .taskrc file {1}" #define STRING_PARSER_ALTERNATE_DATA "Using alternate data.location {1}" diff --git a/src/esp-ESP.h b/src/esp-ESP.h index e5b3cbc70..7cc58505c 100644 --- a/src/esp-ESP.h +++ b/src/esp-ESP.h @@ -106,7 +106,6 @@ #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_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_ALTERNATE_RC "Usando el archivo .taskrc alternativo {1}" #define STRING_PARSER_ALTERNATE_DATA "Usando data.location alternativa {1}" diff --git a/src/fra-FRA.h b/src/fra-FRA.h index 581501cb0..c855a9949 100644 --- a/src/fra-FRA.h +++ b/src/fra-FRA.h @@ -106,7 +106,6 @@ #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_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_ALTERNATE_RC "Utilise un fichier .taskrc alternatif : {1}" #define STRING_PARSER_ALTERNATE_DATA "Utilise une data.location alternative : {1}" diff --git a/src/ita-ITA.h b/src/ita-ITA.h index 8f2179da3..aaff2d231 100644 --- a/src/ita-ITA.h +++ b/src/ita-ITA.h @@ -107,7 +107,6 @@ #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_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_ALTERNATE_RC "Uso del file .taskrc alternativo {1}" #define STRING_PARSER_ALTERNATE_DATA "Uso di data.location alternativa {1}" diff --git a/src/por-PRT.h b/src/por-PRT.h index f5ef36816..12fc23f94 100644 --- a/src/por-PRT.h +++ b/src/por-PRT.h @@ -106,7 +106,6 @@ #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_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_ALTERNATE_RC "Usando o ficheiro .taskrc alternativo {1}" #define STRING_PARSER_ALTERNATE_DATA "Usando data.location alternativa {1}"