aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src/svg_import_util.cpp
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-08-29 16:27:23 +0200
committerjaseg <git@jaseg.de>2021-09-29 16:37:59 +0200
commit7eb0b9d7e42a20b85bd7afbfe3d33d9dd5fa5794 (patch)
tree5ac1f274b0c933234535c6b8f19a8d270f9e2d83 /svg-flatten/src/svg_import_util.cpp
parentc58b6573f2a0694c0c1942e7c36704e0517ced19 (diff)
downloadgerbolyze-7eb0b9d7e42a20b85bd7afbfe3d33d9dd5fa5794.tar.gz
gerbolyze-7eb0b9d7e42a20b85bd7afbfe3d33d9dd5fa5794.tar.bz2
gerbolyze-7eb0b9d7e42a20b85bd7afbfe3d33d9dd5fa5794.zip
svg-flatten: Add wasmtime support
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;
}