From 3124974e9819bbe6a0421e16fdccc03d0773126f Mon Sep 17 00:00:00 2001 From: vng Date: Mon, 25 Feb 2013 19:59:28 +0300 Subject: [PATCH] Fix bug with is digit in android release. --- search/search_query.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/search/search_query.cpp b/search/search_query.cpp index 3b2c0547dd..4c938788e5 100644 --- a/search/search_query.cpp +++ b/search/search_query.cpp @@ -910,13 +910,22 @@ template void Query::Params::ForEachToken(ToDo toDo) } } +string DebugPrint(Query::Params const & p) +{ + return ("Query::Params: Tokens = " + DebugPrint(p.m_tokens) + + "; Prefixes = " + DebugPrint(p.m_prefixTokens)); +} + namespace { bool IsNumber(strings::UniString const & s) { for (size_t i = 0; i < s.size(); ++i) - if (!isdigit(s[i])) + { + // android production ndk-r8d has bug. "еда" detected as a number. + if (s[i] > 127 || !isdigit(s[i])) return false; + } return true; }