|
My fix code:
if(patternmatchbyte(data[i], &searchpattern.at(pos))) //check if our pattern matches the current byte
{
pos++;
if(pos==searchpatternsize) //everything matched
return i-searchpatternsize+1;
}
else if (pos>0)
{
i-=pos; // return to prev
pos=0; //reset current pattern position
}
__________________
Welcome to my place http://www.reaonline.net
|