--- libelwix/src/regex.c 2013/01/17 10:05:35 1.1 +++ libelwix/src/regex.c 2024/10/27 04:09:27 1.3.90.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: regex.c,v 1.1 2013/01/17 10:05:35 misho Exp $ +* $Id: regex.c,v 1.3.90.1 2024/10/27 04:09:27 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 +Copyright 2004 - 2024 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -61,7 +61,7 @@ regex_Verify(const char *csRegex, const char *csData, regex_t re; regmatch_t match; char szErr[STRSIZ]; - int ret, flg; + int ret = 0, flg; const char *pos; if (!csRegex || !csData) @@ -74,7 +74,7 @@ regex_Verify(const char *csRegex, const char *csData, return NULL; } - for (ret = flg = 0, pos = csData; !(ret = regexec(&re, pos, 1, &match, flg)); + for (flg = 0, pos = csData; !(ret = regexec(&re, pos, 1, &match, flg)); pos += match.rm_eo, flg = REG_NOTBOL) { if (startPos) *startPos = match.rm_so;