![]() |
|
#4
|
||||
|
||||
|
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 |
| The Following User Gave Reputation+1 to Computer_Angel For This Useful Post: | ||
mr.exodia (06-29-2014) | ||
| Tags |
| finder, nibble, pattern, string, wildcard |
| Thread Tools | |
| Display Modes | |
|
|