View Single Post
  #4  
Old 06-29-2014, 10:00
Computer_Angel's Avatar
Computer_Angel Computer_Angel is offline
Lo*eXeTools*rd
 
Join Date: Aug 2003
Posts: 151
Rept. Given: 68
Rept. Rcvd 37 Times in 18 Posts
Thanks Given: 10
Thanks Rcvd at 1 Time in 1 Post
Computer_Angel Reputation: 37
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
Reply With Quote
The Following User Gave Reputation+1 to Computer_Angel For This Useful Post:
mr.exodia (06-29-2014)