--- libelwix/src/regex.c 2015/06/25 17:53:50 1.3 +++ 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.3 2015/06/25 17:53:50 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 - 2015 +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;