diff options
author | chatty | 1996-03-21 13:14:25 +0000 |
---|---|---|
committer | chatty | 1996-03-21 13:14:25 +0000 |
commit | 37a62506f296b8cb967a44a77d18439c0e32ffbd (patch) | |
tree | 0a8ed1e46adcdca9ab0cc0af7292967c89871f11 /utils | |
parent | d734491af905a58a330dbcd1bffa67645b1c08ed (diff) | |
download | ivy-league-37a62506f296b8cb967a44a77d18439c0e32ffbd.zip ivy-league-37a62506f296b8cb967a44a77d18439c0e32ffbd.tar.gz ivy-league-37a62506f296b8cb967a44a77d18439c0e32ffbd.tar.bz2 ivy-league-37a62506f296b8cb967a44a77d18439c0e32ffbd.tar.xz |
Fixed two bugs in POSIX version
Diffstat (limited to 'utils')
-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; } |