This commit is contained in:
xarkes 2017-11-08 10:18:07 +01:00
parent 377efa7050
commit 2ccef94ea5
3 changed files with 4 additions and 5 deletions

View File

@ -342,7 +342,7 @@ void CutterCore::renameFunction(QString prev_name, QString new_name)
void CutterCore::setComment(RVA addr, QString cmt)
{
cmd("CC " + cmt + " @ " + QString::number(addr));
cmd("CCu base64:" + cmt.toLocal8Bit().toBase64() + " @ " + QString::number(addr));
emit commentsChanged();
}

View File

@ -13,7 +13,6 @@ CommentsDialog::~CommentsDialog() {}
void CommentsDialog::on_buttonBox_accepted()
{
// Meow
}
void CommentsDialog::on_buttonBox_rejected()

View File

@ -109,15 +109,15 @@ void DisassemblyContextMenu::init()
void DisassemblyContextMenu::on_actionAddComment_triggered()
{
RAnalFunction *fcn = CutterCore::getInstance()->functionAt(offset);
RAnalFunction *fcn = Core()->functionAt(offset);
CommentsDialog *c = new CommentsDialog(this);
if (c->exec())
{
QString comment = c->getComment();
CutterCore::getInstance()->setComment(offset, comment);
Core()->setComment(offset, comment);
if (fcn)
{
CutterCore::getInstance()->seek(fcn->addr);
Core()->seek(fcn->addr);
}
}
}