Skip to content

Commit

Permalink
Fix #16142 - missleading wopD error message
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Mar 5, 2020
1 parent c3dbfae commit b2e2209
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions libr/core/cmd_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,20 +421,9 @@ static void cmd_write_op (RCore *core, const char *input) {
}
r_cons_newline ();
} else {
while (true) {
int res = r_core_write_at (core, addr, ptr, len);
if (res != 0) {
cmd_write_fail (core);
}
if (res < 1 || len == res) {
break;
}
if (res < len) {
ptr += res;
len -= res;
addr += res;
}
}
if (!r_core_write_at (core, addr, ptr, len)) {
cmd_write_fail (core);
}
}
free (buf);
} else {
Expand Down

0 comments on commit b2e2209

Please sign in to comment.