summaryrefslogtreecommitdiff
path: root/src/times.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/times.cc')
-rw-r--r--src/times.cc7
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()) {