GUI: possible fix for an irreproducible crash
This commit is contained in:
parent
7c83379d6f
commit
8f3d12dafe
|
@ -279,12 +279,10 @@ void* Bridge::processMessage(GUIMSG type, void* param1, void* param2)
|
||||||
return 0;
|
return 0;
|
||||||
QBeaEngine disasm(int(ConfigUint("Disassembler", "MaxModuleSize")));
|
QBeaEngine disasm(int(ConfigUint("Disassembler", "MaxModuleSize")));
|
||||||
Instruction_t instr = disasm.DisassembleAt(wBuffer, 16, 0, parVA);
|
Instruction_t instr = disasm.DisassembleAt(wBuffer, 16, 0, parVA);
|
||||||
RichTextPainter::List richText;
|
QString finalInstruction;
|
||||||
CapstoneTokenizer::TokenToRichText(instr.tokens, richText, 0);
|
for(const auto & curToken : instr.tokens.tokens)
|
||||||
QString finalInstruction = "";
|
finalInstruction += curToken.text;
|
||||||
for(const auto & curRichText : richText)
|
strncpy_s(text, GUI_MAX_DISASSEMBLY_SIZE, finalInstruction.toUtf8().constData(), _TRUNCATE);
|
||||||
finalInstruction += curRichText.text;
|
|
||||||
strcpy_s(text, GUI_MAX_DISASSEMBLY_SIZE, finalInstruction.toUtf8().constData());
|
|
||||||
return (void*)1;
|
return (void*)1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue