only write as much data to the outfile as was read. affects tests only.

This commit is contained in:
cbiesinger%web.de 2004-07-30 21:53:56 +00:00
parent 48fa1ada07
commit 0c88d9b652

View File

@ -86,7 +86,7 @@ main(int argc, char **argv)
PRUint32 read;
while (NS_SUCCEEDED(stream->Read(buf, sizeof(buf), &read)) && read) {
fwrite(buf, 1, sizeof(buf), outfile);
fwrite(buf, 1, read, outfile);
}
printf("Done\n");