Skip to content

Commit

Permalink
Fix write(0) in radiff2 -x
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed May 10, 2017
1 parent 1b5a746 commit 81f2f82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion binr/radiff2/radiff2.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ static void dump_cols(ut8 *a, int as, ut8 *b, int bs, int w) {
if (as != bs) {
r_cons_printf ("...\n");
}
r_cons_flush();
r_cons_flush ();
}

static void handle_sha256(const ut8 *block, int len) {
Expand Down
3 changes: 3 additions & 0 deletions libr/cons/cons.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ static inline void r_cons_write(const char *buf, int len) {
}
}
#else
if (I.fdout < 1) {
I.fdout = 1;
}
(void) write (I.fdout, buf, len);
#endif
}
Expand Down

0 comments on commit 81f2f82

Please sign in to comment.