[ctrtool] Fix compile errors

And comparisons which would have always returned false.
This commit is contained in:
jakcron
2016-01-08 20:45:14 +08:00
parent b1725fda79
commit 9b4415a7a0
3 changed files with 23 additions and 6 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ int stream_out_flush(stream_out_context* ctx)
if (ctx->outbufferpos > 0)
{
size_t writtenbytes = fwrite(ctx->outbuffer, 1, ctx->outbufferpos, ctx->outfile);
if (writtenbytes < 0)
if (writtenbytes == 0) // will be zero if nothing is written
return 0;