From 37a62506f296b8cb967a44a77d18439c0e32ffbd Mon Sep 17 00:00:00 2001 From: chatty Date: Thu, 21 Mar 1996 13:14:25 +0000 Subject: Fixed two bugs in POSIX version --- utils/RegExp.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utils') 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; } -- cgit v1.1