Selaa lähdekoodia

PCRE - add error handling

master
Arun Prakash Jana 4 vuotta sitten
vanhempi
commit
e2d37632ea
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. +6
    -2
      src/nnn.c

+ 6
- 2
src/nnn.c Näytä tiedosto

@@ -1884,8 +1884,12 @@ static int regflags = REG_NOSUB | REG_EXTENDED | REG_ICASE;
#ifdef PCRE #ifdef PCRE
static int setfilter(pcre **pcrex, const char *filter) static int setfilter(pcre **pcrex, const char *filter)
{ {
*pcrex = pcre_compile(filter, pcreflags, NULL, NULL, NULL);
return *pcrex ? 0 : -1;
const char *errstr = NULL;
int erroffset = 0;

*pcrex = pcre_compile(filter, pcreflags, &errstr, &erroffset, tables);

return errstr ? -1 : 0;
} }
#else #else
static int setfilter(regex_t *regex, const char *filter) static int setfilter(regex_t *regex, const char *filter)


Loading…
Peruuta
Tallenna