Skip to content

Commit 451c9da

Browse files
committed
Slurp raw stdin before converting it with rax2 -S ##tools
1 parent 4b6dc87 commit 451c9da

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

libr/main/rax2.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ static int use_stdin(RNum *num, RaxActions *flags, RaxMode *mode, PJ **pj) {
5656
if (!rax (num, buf, 1, 0, flags, mode, pj)) {
5757
rc = 1;
5858
}
59+
} else if (flags->raw2hexstr) {
60+
int len = 0;
61+
char *buf = r_stdin_slurp (&len);
62+
if (buf) {
63+
if (!rax (num, buf, len, 0, flags, mode, pj)) {
64+
rc = 1;
65+
}
66+
free (buf);
67+
}
5968
} else {
6069
int l = 0;
6170
for (;;) {

0 commit comments

Comments
 (0)