]> git.siccegge.de Git - frida/frida.git/blobdiff - src/gui/widgets/BasicBlockWidget.cxx
(De)serialization of Comments
[frida/frida.git] / src / gui / widgets / BasicBlockWidget.cxx
index bdddd520f429c925fb4a446a3209867e2a13e1de..efa7ec34394ec6d2416933c99d452d1b054032fa 100644 (file)
@@ -30,7 +30,7 @@ void CustomQGraphicsTextItem::addComment(int row, bool global) {
                if (global) {
                        comment = parent->block->getManager()->newGlobalComment(address);
                } else {
-                       comment = parent->block->getManager()->newLocalComment(address, NULL);
+                       comment = parent->block->getManager()->newLocalComment(address, (Function*)0x23);
                }
                comment->setText(dialog.result().toStdString());
                parent->block->getManager()->finishComment(comment);
@@ -195,7 +195,7 @@ QString BasicBlockWidget::formatComments(Instruction* inst) {
        QString comments;
        for (Comment* c: inst->comments()) {
                comments += "<br />";
-               comments += c->getText().c_str();
+               comments += QString(c->getText().c_str()).toHtmlEscaped();
        }
        return (comments == "" ? "" : ";; ") + comments.trimmed();
 }