exponent);
if (elen < width) {
+ STRLEN gap = (STRLEN)(width - elen);
if (left) {
/* Pad the back with spaces. */
- memset(PL_efloatbuf + elen, ' ', width - elen);
+ memset(PL_efloatbuf + elen, ' ', gap);
}
else if (fill == '0') {
/* Insert the zeros after the "0x" and the
* the potential sign, but before the digits,
* otherwise we end up with "0000xH.HHH...",
* when we want "0x000H.HHH..." */
- STRLEN nzero = width - elen;
+ STRLEN nzero = gap;
char* zerox = PL_efloatbuf + 2;
STRLEN nmove = elen - 2;
if (negative || plus) {
}
else {
/* Move it to the right. */
- Move(PL_efloatbuf, PL_efloatbuf + width - elen,
+ Move(PL_efloatbuf, PL_efloatbuf + gap,
elen, char);
/* Pad the front with spaces. */
- memset(PL_efloatbuf, ' ', width - elen);
+ memset(PL_efloatbuf, ' ', gap);
}
elen = width;
}
if (elen) {
/* Not affecting infnan output: precision, alt, fill. */
if (elen < width) {
+ STRLEN gap = (STRLEN)(width - elen);
if (left) {
/* Pack the back with spaces. */
- memset(PL_efloatbuf + elen, ' ', width - elen);
+ memset(PL_efloatbuf + elen, ' ', gap);
} else {
/* Move it to the right. */
- Move(PL_efloatbuf, PL_efloatbuf + width - elen,
+ Move(PL_efloatbuf, PL_efloatbuf + gap,
elen, char);
/* Pad the front with spaces. */
- memset(PL_efloatbuf, ' ', width - elen);
+ memset(PL_efloatbuf, ' ', gap);
}
elen = width;
}