Initialize settings earlier and disable jmptbl (#576)

This commit is contained in:
xarkes 2018-07-12 15:04:33 +02:00 committed by GitHub
parent d9d1ce3b91
commit bf911b4ba2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View File

@ -833,14 +833,10 @@ void CutterCore::setSettings()
setConfig("anal.hasnext", false); setConfig("anal.hasnext", false);
setConfig("asm.lines.call", false); setConfig("asm.lines.call", false);
setConfig("anal.autoname", true); setConfig("anal.autoname", true);
setConfig("anal.jmptbl", false);
// Fucking pancake xD
setConfig("cfg.fortunes.tts", false); setConfig("cfg.fortunes.tts", false);
// Used by the HTML5 graph
setConfig("http.cors", true);
setConfig("http.sandbox", false);
// Colors // Colors
setConfig("scr.color", COLOR_MODE_DISABLED); setConfig("scr.color", COLOR_MODE_DISABLED);

View File

@ -75,6 +75,9 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
bool analLevelSpecified = false; bool analLevelSpecified = false;
int analLevel = 0; int analLevel = 0;
// Initialize CutterCore and set default settings
Core()->setSettings();
if (cmd_parser.isSet(analOption)) { if (cmd_parser.isSet(analOption)) {
analLevel = cmd_parser.value(analOption).toInt(&analLevelSpecified); analLevel = cmd_parser.value(analOption).toInt(&analLevelSpecified);

View File

@ -353,10 +353,9 @@ void MainWindow::finalizeOpen()
{ {
core->getOpcodes(); core->getOpcodes();
// Set settings to override any incorrect saved in the project // Override any incorrect setting saved in the project
core->setSettings(); core->setSettings();
addOutput(tr(" > Populating UI")); addOutput(tr(" > Populating UI"));
// FIXME: initialization order frakup. the next line is needed so that the // FIXME: initialization order frakup. the next line is needed so that the
// comments widget displays the function names. // comments widget displays the function names.