diff options
-rw-r--r-- | utils/RegExp.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/RegExp.cc b/utils/RegExp.cc index 4a8ecff..82e5dab 100644 --- a/utils/RegExp.cc +++ b/utils/RegExp.cc @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1991, 1992 + * Copyright 1991-1996 * Laboratoire de Recherche en Informatique (LRI) * Centre d'Etudes de la Navigation Aerienne (CENA) * @@ -48,7 +48,7 @@ CcuRegExp :: Compile () struct regex_t tmp; if (regcomp (&tmp, String, REG_NOSUB) == 0) { Compiled = malloc (sizeof (struct regex_t)); - memcpy (&Compiled, &tmp, sizeof (struct regex_t)); + memcpy (Compiled, &tmp, sizeof (struct regex_t)); return true; } else return false; @@ -62,7 +62,7 @@ bool CcuRegExp :: Match (const char* s) { if (Compiled) - return regexec ((struct regex_t*) Compiled, s, 0, 0, 0) ? true : false; + return regexec ((struct regex_t*) Compiled, s, 0, 0, 0) == 0 ? true : false; else return false; } |