View Single Post
Old Oct 9th, 2006, 3:06 AM   #5
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
Next time, make sure your tabs are right.

Here's your problem:
for (int f = 0; f < 302; f++)
        {
             iter++;
             if (fileout[iter] == 0x74 && fileout[iter+1] == 0x68 && fileout[iter+2] == 0x65)
             {

Firstly, what is the goal of iter++, while you already have f?
Now, your actual error: When f equal 301, iter will contain the same value. You can figure out yourself what the answer of 301 + 2 is.
Polyphemus_ is offline   Reply With Quote