fix: This line attempts to assign the character following a backslash (\) to tmp->ch, but it should assign the current character pointed by regexp after increment, not the next one

This line attempts to assign the character following a backslash (\) to tmp->ch, but it should assign the current character pointed by regexp after increment, not the next one
This commit is contained in:
Hurrison 2024-04-28 14:22:54 +08:00 committed by sbwml
parent 97d7eeb86b
commit 543502ad83

View File

@ -87,7 +87,7 @@ static RE* compile(char *regexp)
}else
{
tmp->type = CHAR;
tmp->ch = *(regexp + 1);
tmp->ch = *regexp;
}
break;
case '.':