From 8cb760af1428dcbb64a15b081aa4f4afa80d28c9 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 16 May 2023 09:12:24 -0400 Subject: [PATCH] cwSvg.cpp : Fixed bug which resulted in attribute lists being duplicated on SVG elements. --- cwSvg.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cwSvg.cpp b/cwSvg.cpp index 70d183c..4348243 100644 --- a/cwSvg.cpp +++ b/cwSvg.cpp @@ -612,7 +612,6 @@ cw::rc_t cw::svg::_set_attr( handle_t h, const char* selectorStr, const char* at int bufN = 64; char buf[ bufN + 1 ]; - if( suffix != nullptr ) { snprintf(buf,bufN,"%s%s",value,suffix); @@ -812,7 +811,7 @@ cw::rc_t cw::svg::write( handle_t h, const char* outFn, const char* cssFn, unsig dStyleStr = mem::printf(dStyleStr, "style=\"%s\" ",_print_css_attr_list(e->css->attrL,dStyleStr)); if( e->attrL != nullptr ) - dStyleStr = mem::printp(dStyleStr,"%s",_print_ele_attr_list(e->attrL,dStyleStr) ); + dStyleStr = _print_ele_attr_list(e->attrL,dStyleStr); const char* styleStr = dStyleStr==nullptr ? "" : dStyleStr;