mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 05:45:27 +00:00
Fix closing file in CutterCore::tryFile(), Fix #26
This commit is contained in:
parent
05982b1304
commit
b0137892cd
@ -114,7 +114,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
//delete core;
|
||||
}
|
||||
|
||||
void MainWindow::initUI()
|
||||
|
@ -228,9 +228,7 @@ bool CutterCore::loadFile(QString path, uint64_t loadaddr, uint64_t mapaddr, boo
|
||||
RCoreFile *f;
|
||||
if (va == 0 || va == 2)
|
||||
r_config_set_i(core_->config, "io.va", va);
|
||||
// NO ONE KNOWS WHY THIS IS FIXING A SEGFAULT. core_->file should have already a proper value. Pancake dixit
|
||||
//core_->file = NULL;
|
||||
// mapaddr = 0LL;
|
||||
|
||||
printf("FILE OPEN (%s)\n", path.toUtf8().constData());
|
||||
f = r_core_file_open(core_, path.toUtf8().constData(), rw ? (R_IO_READ | R_IO_WRITE) : R_IO_READ, mapaddr);
|
||||
if (!f)
|
||||
@ -459,7 +457,7 @@ bool CutterCore::tryFile(QString path, bool rw)
|
||||
}
|
||||
// if rbin works, tell entry0, and symbols (main, constructor, ..)
|
||||
|
||||
//r_core_file_close (this->core, cf);
|
||||
r_core_file_close (this->core_, cf);
|
||||
|
||||
sdb_bool_set(DB, "try.is_writable", is_writable, 0);
|
||||
sdb_set(DB, "try.filetype", "elf.i386", 0);
|
||||
|
Loading…
Reference in New Issue
Block a user