Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeizhen Huang <itsnotrj@gmail.com>2022-11-11 18:17:58 +0300
committerWeizhen Huang <itsnotrj@gmail.com>2022-11-11 18:17:58 +0300
commitdad3574a8c0b673efa9d7f7c890d9562e3f6a267 (patch)
tree84dff4a90c34a44744c329de21a999289f9d209a /source/blender/io/gpencil/intern/gpencil_io_export_svg.cc
parente9260afa93068d0181de6e3223f65e7bb016aecc (diff)
parentdc8a1d38b73420428f9fb878386b99ebb69dd841 (diff)
Merge branch 'master' into soc-2022-many-lights-sampling
Diffstat (limited to 'source/blender/io/gpencil/intern/gpencil_io_export_svg.cc')
-rw-r--r--source/blender/io/gpencil/intern/gpencil_io_export_svg.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc b/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc
index 8acb87f8e58..b85fd33e116 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc
@@ -90,7 +90,8 @@ void GpencilExporterSVG::create_document_header()
pugi::xml_node comment = main_doc_.append_child(pugi::node_comment);
char txt[128];
- sprintf(txt, " Generator: Blender, %s - %s ", SVG_EXPORTER_NAME, SVG_EXPORTER_VERSION);
+ BLI_snprintf(
+ txt, sizeof(txt), " Generator: Blender, %s - %s ", SVG_EXPORTER_NAME, SVG_EXPORTER_VERSION);
comment.set_value(txt);
pugi::xml_node doctype = main_doc_.append_child(pugi::node_doctype);
@@ -147,7 +148,7 @@ void GpencilExporterSVG::export_gpencil_layers()
pugi::xml_node ob_node = frame_node_.append_child("g");
char obtxt[96];
- sprintf(obtxt, "blender_object_%s", ob->id.name + 2);
+ BLI_snprintf(obtxt, sizeof(obtxt), "blender_object_%s", ob->id.name + 2);
ob_node.append_attribute("id").set_value(obtxt);
/* Use evaluated version to get strokes with modifiers. */
@@ -402,7 +403,7 @@ std::string GpencilExporterSVG::rgb_to_hexstr(const float color[3])
uint8_t g = color[1] * 255.0f;
uint8_t b = color[2] * 255.0f;
char hex_string[20];
- sprintf(hex_string, "#%02X%02X%02X", r, g, b);
+ BLI_snprintf(hex_string, sizeof(hex_string), "#%02X%02X%02X", r, g, b);
std::string hexstr = hex_string;