Commit 344baf40 authored by Michael Smith's avatar Michael Smith

Make sure we write _everything_ we wanted to write, not just that we wrote

something. Probably makes no difference in reality, but it's better to be
safe.

svn path=/trunk/vorbis-tools/; revision=2093
parent cd5e7f10
......@@ -102,7 +102,7 @@ int oe_encode(oe_enc_opt *opt)
{
if(!result) break;
ret = oe_write_page(&og, opt->out);
if(!ret)
if(ret != og.header_len + og.body_len)
{
opt->error("Failed writing header to output stream\n");
ret = 1;
......@@ -167,7 +167,7 @@ int oe_encode(oe_enc_opt *opt)
if(!result) break;
ret = oe_write_page(&og, opt->out);
if(!ret)
if(ret != og.header_len + og.body_len)
{
opt->error("Failed writing data to output stream\n");
ret = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment