forked from mirrors/tftp-hpa-google
Handle transformations with matches
This commit is contained in:
parent
cbf26dca81
commit
8a2f696097
1 changed files with 3 additions and 2 deletions
|
@ -90,8 +90,9 @@ static int genmatchstring(char *string, const char *pattern, const char *input,
|
|||
mlen = pmatch[n].rm_eo - pmatch[n].rm_so;
|
||||
len += mlen;
|
||||
if ( string ) {
|
||||
memcpy(string, input+pmatch[n].rm_so, mlen);
|
||||
string += mlen;
|
||||
const char *p = input+pmatch[n].rm_so;
|
||||
while ( mlen-- )
|
||||
*string++ = xform(*p++);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue