S
Shafik
Hello folks,
I am having a really weird problem. Under windows XP, a simple C
program designed to write to a file has been adding EXTRA characters
to the output file.
First I used "fwrite", to write, lets say, 1000 bytes in binary. The
output contained 1022 bytes, even though fwrite told me (returned)
that it only wrote 1000 bytes.
After much debugging, I saw that every time there was a "0x0A" byte to
be written, a "0x0D" was automatically appended! Thus adding extra
bytes to the file. What is going on?
I tried a simple loop with fputc instead of fwrite, and the behavior
was the exact same.
Anyone experienced this sort of thing before?
Thanks,
--Shafik
I am having a really weird problem. Under windows XP, a simple C
program designed to write to a file has been adding EXTRA characters
to the output file.
First I used "fwrite", to write, lets say, 1000 bytes in binary. The
output contained 1022 bytes, even though fwrite told me (returned)
that it only wrote 1000 bytes.
After much debugging, I saw that every time there was a "0x0A" byte to
be written, a "0x0D" was automatically appended! Thus adding extra
bytes to the file. What is going on?
I tried a simple loop with fputc instead of fwrite, and the behavior
was the exact same.
Anyone experienced this sort of thing before?
Thanks,
--Shafik