A simple one.

This commit is contained in:
2025-03-03 01:14:07 -05:00
parent d814e000bd
commit a36901db50

View File

@ -23,6 +23,8 @@
#include <stdio.h> /* for sprintf */ #include <stdio.h> /* for sprintf */
#include <errno.h> #include <errno.h>
#include <string>
#include "bw.h" /* for BrowserWindow */ #include "bw.h" /* for BrowserWindow */
#include "msg.h" #include "msg.h"
#include "binaryconst.h" #include "binaryconst.h"
@ -1942,7 +1944,6 @@ static void
Html_tag_content_frame (DilloHtml *html, const char *tag, int tagsize) Html_tag_content_frame (DilloHtml *html, const char *tag, int tagsize)
{ {
const char *attrbuf; const char *attrbuf;
char *src;
Textblock *textblock; Textblock *textblock;
Widget *bullet; Widget *bullet;
@ -1951,7 +1952,7 @@ static void
if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "src"))) if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "src")))
return; return;
src = dStrdup(attrbuf); std::string src = attrbuf;
textblock->addParbreak (5, html->wordStyle ()); textblock->addParbreak (5, html->wordStyle ());
@ -1968,15 +1969,13 @@ static void
/* FRAME: /* FRAME:
* If 'name' tag is present use it, if not use 'src' value */ * If 'name' tag is present use it, if not use 'src' value */
if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "name"))) { if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "name"))) {
textblock->addText (src, html->wordStyle ()); textblock->addText (src.c_str(), html->wordStyle ());
} else { } else {
textblock->addText (attrbuf, html->wordStyle ()); textblock->addText (attrbuf, html->wordStyle ());
} }
} }
textblock->addParbreak (5, html->wordStyle ()); textblock->addParbreak (5, html->wordStyle ());
dFree(src);
} }
/* /*