summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 932438b862..d1324fc60f 100644
--- a/sv.c
+++ b/sv.c
@@ -9329,6 +9329,11 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
p = SvEND(sv);
*p = '\0';
}
+ if (left && ckWARN(WARN_PRINTF) && strchr(eptr, '\n') &&
+ (PL_op->op_type == OP_PRTF || PL_op->op_type == OP_SPRINTF))
+ Perl_warner(aTHX_ packWARN(WARN_PRINTF),
+ "Newline in left-justified string for %sprintf",
+ (PL_op->op_type == OP_PRTF) ? "" : "s");
have = esignlen + zeros + elen;
need = (have > width ? have : width);