/* no matter what, this is a string now */
(void)SvPV_force_nomg(sv, origlen);
+ /* the code that scans for flags etc following a % relies on
+ * a '\0' being present to avoid falling off the end. Ideally that
+ * should be fixed */
+ assert(pat[patlen] == '\0');
+
/* special-case "", "%s", and "%-p" (SVf - see below) */
if (patlen == 0) {
if (svmax && ckWARN(WARN_REDUNDANT))
/* special-case "%.0f" */
if (can_be_special && c == 'f' && !precis) {
if ((eptr = F0convert(nv, ebuf + sizeof ebuf, &elen)))
- break;
+ goto float_concat_no_utf8;
}
/* Determine the buffer size needed for the various
/* May return an empty string for digits==0 */
if (*PL_efloatbuf) {
elen = strlen(PL_efloatbuf);
- goto float_converted;
+ goto float_concat;
}
}
}
GCC_DIAG_RESTORE;
}
- float_converted:
+ float_concat:
eptr = PL_efloatbuf;
/* Since floating-point formats do their own formatting and
* loop which handles appending eptr to sv, and do our own
* stripped-down version */
- assert(!zeros);
- assert(!esignlen);
- assert(!vectorize);
- assert(elen);
- assert(elen >= width);
-
/* floating-point formats only get is_utf8 if the radix point
* is utf8. All other characters in the string are < 128
* and so can be safely appended to both a non-utf8 and utf8
has_utf8 = TRUE;
}
+ float_concat_no_utf8:
+
+ assert(!zeros);
+ assert(!esignlen);
+ assert(!vectorize);
+ assert(elen);
+ assert(elen >= width);
+
+
{
/* unrolled Perl_sv_catpvn */
STRLEN need = elen + SvCUR(sv) + 1;