Bug in getfile example project


[ Follow Ups ] [ Post Followup ] [ Back To Message Board ]

Posted by vincent on July 31, 2006 at 02:19:05:

Hi there!

I don't now if it is mentioned before but there seems to be a small bug in the getfile sample application (at least, it appears at my system, using HawkNL 1.68 on WindowsXP w/ VC++ 6.0).

On line 177 of getfile.c:

Before:
write(f, &buffer[i+1], count - i);

After:
write(f, &buffer[i+1], count - i - 1);

Writing 'count - i' bytes results in writing one byte too much. Changing it with 'count - i - 1' fixes this error.

Best,
Vincent







Follow Ups:


Post a Followup

Name:
E-Mail:

Subject:

Comments:



[ Follow Ups ] [ Post Followup ] [ Back To Message Board ]