From a36901db5013a7fefcb0739861fd2c4d5048c6a125a5465d18a2a53af3c57583 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Mon, 3 Mar 2025 01:14:07 -0500 Subject: [PATCH] A simple one. --- src/html.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/html.cc b/src/html.cc index a57a1c6..acfc436 100644 --- a/src/html.cc +++ b/src/html.cc @@ -23,6 +23,8 @@ #include /* for sprintf */ #include +#include + #include "bw.h" /* for BrowserWindow */ #include "msg.h" #include "binaryconst.h" @@ -1942,7 +1944,6 @@ static void Html_tag_content_frame (DilloHtml *html, const char *tag, int tagsize) { const char *attrbuf; - char *src; Textblock *textblock; Widget *bullet; @@ -1951,7 +1952,7 @@ static void if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "src"))) return; - src = dStrdup(attrbuf); + std::string src = attrbuf; textblock->addParbreak (5, html->wordStyle ()); @@ -1968,15 +1969,13 @@ static void /* FRAME: * If 'name' tag is present use it, if not use 'src' value */ if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "name"))) { - textblock->addText (src, html->wordStyle ()); + textblock->addText (src.c_str(), html->wordStyle ()); } else { textblock->addText (attrbuf, html->wordStyle ()); } } textblock->addParbreak (5, html->wordStyle ()); - - dFree(src); } /*