Fixed yank from file RCoreFile swap, and fixed logic bug in io.c that would prevent file swaps

This commit is contained in:
Adam Pridgen 2014-04-02 13:10:26 -05:00
parent f8679bb888
commit 3ddac2d893

View File

@ -242,9 +242,9 @@ R_API int r_io_set_fdn(RIO *io, int fd) {
static inline int r_io_read_internal(RIO *io, ut8 *buf, int len) {
if (io->buffer_enabled)
return r_io_buffer_read (io, io->off, buf, len);
if (io->io->fd && fd->plugin && io->fd->plugin->read)
if (io->fd && io->fd->plugin && io->fd->plugin->read)
return io->fd->plugin->read (io, io->fd, buf, len);
else if (!io->fd) eprintf ("Something really bad has happened, and r2 is going to die soon. sorry! :-(\n")
else if (!io->fd) eprintf ("Something really bad has happened, and r2 is going to die soon. sorry! :-(\n");
return read (io->fd->fd, buf, len);
}