diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/object/sp-object.cpp | 8 | ||||
| -rw-r--r-- | src/svg/svg-length.cpp | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/object/sp-object.cpp b/src/object/sp-object.cpp index 4a9a347c1..7c6b6c28d 100644 --- a/src/object/sp-object.cpp +++ b/src/object/sp-object.cpp @@ -996,14 +996,6 @@ void SPObject::readAttr(gchar const *key) if (keyid != SP_ATTR_INVALID) { /* Retrieve the 'key' attribute from the object's XML representation */ gchar const *value = getRepr()->attribute(key); - if (value && - (!strcmp(value, "nan") - || !strcmp(value, "-nan") - || !strcmp(value, "NaN") - || !strcmp(value, "-NaN") - )) { - value = nullptr; - } setKeyValue(keyid, value); } diff --git a/src/svg/svg-length.cpp b/src/svg/svg-length.cpp index a4cf82983..dd17a21e9 100644 --- a/src/svg/svg-length.cpp +++ b/src/svg/svg-length.cpp @@ -184,6 +184,10 @@ bool SVGLength::read(gchar const *str) return false; } + if (!strcmp(str, "nan") || !strcmp(str, "-nan") || !strcmp(str, "NaN") || !strcmp(str, "-NaN")) { + return false; + } + SVGLength::Unit u; float v; float c; |
