Commit a5167b2b authored by Daniel Elstner's avatar Daniel Elstner
Browse files

:match): Use the symbolic constant PCRE_ERROR_NOMATCH instead of comparing

* src/pcreshell.cc (Pattern::match): Use the symbolic constant
PCRE_ERROR_NOMATCH instead of comparing with -1 directly.
parent 40f3f08a
2004-05-30 Daniel Elstner <daniel.elstner@gmx.net>
* src/pcreshell.cc (Pattern::match): Use the symbolic constant
PCRE_ERROR_NOMATCH instead of comparing with -1 directly.
2004-05-29 Daniel Elstner <daniel.elstner@gmx.net>
* ui/mainwindow.glade (button_preferences): Remove tool button.
......
......@@ -140,7 +140,8 @@ int Pattern::match(const Glib::ustring& subject, int offset, MatchOptions option
{
const int rc = pcre_exec(pcre_, 0, subject.data(), subject.bytes(),
offset, options, ovector_, ovecsize_);
if (rc >= -1)
if (rc >= 0 || rc == PCRE_ERROR_NOMATCH)
return rc;
// Of all possible error conditions pcre_exec() might return, hitting
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment