From b74560eb0f8302d3f77a6ab3eb724dfc3a5695f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Tue, 24 Jul 2018 19:50:55 +0200 Subject: [PATCH] Fix flagspace for initial script --- src/AnalTask.cpp | 14 ++++++++------ src/Cutter.cpp | 3 ++- src/MainWindow.cpp | 3 --- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/AnalTask.cpp b/src/AnalTask.cpp index 5afc9a88..b281618a 100644 --- a/src/AnalTask.cpp +++ b/src/AnalTask.cpp @@ -71,6 +71,14 @@ void AnalTask::runTask() return; } + if (options.endian != InitialOptions::Endianness::Auto) { + Core()->setEndianness(options.endian == InitialOptions::Endianness::Big); + } + + Core()->setBBSize(options.bbsize); + + Core()->cmd("fs *"); + if (!options.script.isNull()) { log(tr("Executing script...\n")); Core()->loadScript(options.script); @@ -80,12 +88,6 @@ void AnalTask::runTask() return; } - if (options.endian != InitialOptions::Endianness::Auto) { - Core()->setEndianness(options.endian == InitialOptions::Endianness::Big); - } - - Core()->setBBSize(options.bbsize); - // Use prj.simple as default as long as regular projects are broken Core()->setConfig("prj.simple", true); diff --git a/src/Cutter.cpp b/src/Cutter.cpp index b9b44407..99c44b3d 100644 --- a/src/Cutter.cpp +++ b/src/Cutter.cpp @@ -1690,8 +1690,9 @@ QList CutterCore::disassembleLines(RVA offset, int lines) void CutterCore::loadScript(const QString &scriptname) { - r_core_cmd_file(core_, scriptname.toStdString().data()); + r_core_cmd_file(core_, scriptname.toUtf8().constData()); } + QString CutterCore::getVersionInformation() { int i; diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 7b0c10be..cc655e20 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -359,9 +359,6 @@ void MainWindow::finalizeOpen() core->setSettings(); addOutput(tr(" > Populating UI")); - // FIXME: initialization order frakup. the next line is needed so that the - // comments widget displays the function names. - core->cmd("fs sections"); refreshAll(); addOutput(tr(" > Finished, happy reversing :)"));