aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src/svg_import_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'svg-flatten/src/svg_import_util.cpp')
-rw-r--r--svg-flatten/src/svg_import_util.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/svg-flatten/src/svg_import_util.cpp b/svg-flatten/src/svg_import_util.cpp
index cb60482..85db3ad 100644
--- a/svg-flatten/src/svg_import_util.cpp
+++ b/svg-flatten/src/svg_import_util.cpp
@@ -61,6 +61,11 @@ string gerbolyze::parse_data_iri(const string &data_url) {
size_t b64_begin = data_url.find_first_not_of(" ", foo + strlen("base64,"));
assert(b64_begin != string::npos);
- return base64_decode(data_url.substr(b64_begin));
+ bool err_out;
+ string out = base64_decode(data_url.substr(b64_begin), false, &err_out);
+
+ if (err_out)
+ return "";
+ return out;
}