if (err != 0) {
size_t len = regerror (err, ®exp, NULL, 0);
char *buffer = new char[len];
- std::string msg;
+ std::string msg = "Regexp error: ";
(void) regerror (err, ®exp, buffer, len);
- msg.assign (buffer, len);
+ msg.append (buffer, len);
delete[] buffer;
throw Xapian::QueryParserError (msg);
* phrase parsing, when possible */
std::string query_str;
- if (str.find (' ') != std::string::npos)
+ if (*str.rbegin () != '*' || str.find (' ') != std::string::npos)
query_str = '"' + str + '"';
else
query_str = str;