diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-20 21:33:23 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-20 21:33:23 -0500 |
commit | 117dddabd4f883de4f464821f9567d889a6fa449 (patch) | |
tree | 602c8c5e72b81ffc9bcf01bbaed5e2875d0e60a0 /src/times.cc | |
parent | cc9110a43a1e2d006de8d24a84bbfb2c6918cf33 (diff) | |
parent | 4e6ec09e4d2a69dcb06627e44512980b09561448 (diff) | |
download | fork-ledger-117dddabd4f883de4f464821f9567d889a6fa449.tar.gz fork-ledger-117dddabd4f883de4f464821f9567d889a6fa449.tar.bz2 fork-ledger-117dddabd4f883de4f464821f9567d889a6fa449.zip |
Merge branch 'next'
Diffstat (limited to 'src/times.cc')
-rw-r--r-- | src/times.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/times.cc b/src/times.cc index e3ccaff8..d4317509 100644 --- a/src/times.cc +++ b/src/times.cc @@ -1321,10 +1321,13 @@ date_parser_t::lexer_t::token_t date_parser_t::lexer_t::next_token() catch (...) {} } + start = begin; + string term; bool alnum = std::isalnum(*begin); - for (start = begin; (begin != end && ! std::isspace(*begin) && - alnum == std::isalnum(*begin)); begin++) + for (; (begin != end && ! std::isspace(*begin) && + ((alnum && static_cast<bool>(std::isalnum(*begin))) || + (! alnum && ! static_cast<bool>(std::isalnum(*begin))))); begin++) term.push_back(*begin); if (! term.empty()) { |