summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index 45b17b1b62..e9e14fc6c3 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1774,9 +1774,9 @@ S_swash_get(pTHX_ SV* swash, UV start, UV span)
}
/* create and initialize $swatch */
- swatch = newSVpvs("");
scur = octets ? (span * octets) : (span + 7) / 8;
- SvGROW(swatch, scur + 1);
+ swatch = newSV(scur);
+ SvPOK_on(swatch);
s = (U8*)SvPVX(swatch);
if (octets && none) {
const U8* const e = s + scur;