Skip to content

Commit

Permalink
Set r2 prefix before r_core_loadlibs()
Browse files Browse the repository at this point in the history
  • Loading branch information
thestr4ng3r committed Jul 14, 2018
1 parent 000d0ce commit 806bd63
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Cutter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ CutterCore::CutterCore(QObject *parent) :
{
r_cons_new(); // initialize console
this->core_ = r_core_new();
r_core_loadlibs(this->core_, R_CORE_LOADLIBS_ALL, NULL);
// IMPLICIT r_bin_iobind (core_->bin, core_->io);

// Otherwise r2 may ask the user for input and Cutter would freeze
setConfig("scr.interactive", false);

#if defined(APPIMAGE) || defined(MACOS_R2_BUNDLED)
auto prefix = QDir(QCoreApplication::applicationDirPath());
Expand All @@ -73,6 +68,12 @@ CutterCore::CutterCore(QObject *parent) :
setConfig("dir.prefix", prefix.absolutePath());
#endif

r_core_loadlibs(this->core_, R_CORE_LOADLIBS_ALL, NULL);
// IMPLICIT r_bin_iobind (core_->bin, core_->io);

// Otherwise r2 may ask the user for input and Cutter would freeze
setConfig("scr.interactive", false);

asyncTaskManager = new AsyncTaskManager(this);
}

Expand Down

0 comments on commit 806bd63

Please sign in to comment.