If there is error return an empty string.
@@ -62,7 +62,11 @@ IntegerAttribute::getString(DocId doc, char * s, size_t sz) const {
if (sz > 1) {
largeint_t v = getInt(doc);
auto res = std::to_chars(s, s + sz - 1, v, 10);
+ if (res.ec == std::errc()) {
res.ptr[0] = 0;
+ } else {
+ s[0] = 0;
+ }
}
return s;
}
