diff options
author | John Wiegley <johnw@newartisans.com> | 2022-01-27 21:28:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 21:28:52 -0800 |
commit | bcbcf169d5fddd48a77e30ef60ba07c0a2e1e1ab (patch) | |
tree | 47a132b29a9ea3b362789c48d122ec5f68f2563b /src/times.cc | |
parent | e001548e7f68f304dd6a98f0919fe15ee3e24496 (diff) | |
parent | 436895905d19f8ef0d3258cd515052a0e540b8b4 (diff) | |
download | fork-ledger-bcbcf169d5fddd48a77e30ef60ba07c0a2e1e1ab.tar.gz fork-ledger-bcbcf169d5fddd48a77e30ef60ba07c0a2e1e1ab.tar.bz2 fork-ledger-bcbcf169d5fddd48a77e30ef60ba07c0a2e1e1ab.zip |
Merge branch 'master' into add-flake
Diffstat (limited to 'src/times.cc')
-rw-r--r-- | src/times.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/times.cc b/src/times.cc index bab4e0de..127cdd69 100644 --- a/src/times.cc +++ b/src/times.cc @@ -1621,17 +1621,10 @@ void date_parser_t::lexer_t::token_t::unexpected() void date_parser_t::lexer_t::token_t::expected(char wanted, char c) { - if (c == '\0' || c == -1) { - if (wanted == '\0' || wanted == -1) - throw_(date_error, _("Unexpected end")); - else - throw_(date_error, _f("Missing '%1%'") % wanted); - } else { - if (wanted == '\0' || wanted == -1) - throw_(date_error, _f("Invalid char '%1%'") % c); - else - throw_(date_error, _f("Invalid char '%1%' (wanted '%2%')") % c % wanted); - } + if (wanted == '\0') + throw_(date_error, _f("Invalid char '%1%'") % c); + else + throw_(date_error, _f("Invalid char '%1%' (wanted '%2%')") % c % wanted); } namespace { |