diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-06-24 03:47:39 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-06-24 03:47:39 -0500 |
commit | 61a3fb803c3babf0e3e750430415338e6506a241 (patch) | |
tree | c8a5f56b6cfb2a4687a02e6b7263cd98a86bb89b /pp.c | |
parent | f914a68295eedf2aa19e258317bc5955132805b4 (diff) | |
download | perl-61a3fb803c3babf0e3e750430415338e6506a241.tar.gz |
add warning for negative argument to chr() [perl #83048]
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3262,7 +3262,8 @@ PP(pp_chr) if (IN_BYTES) { value = POPu; /* chr(-1) eq chr(0xff), etc. */ } else { - (void) POPs; /* Ignore the argument value. */ + SV *top = POPs; + Perl_ck_warner(aTHX_ packWARN(WARN_UTF8), "Invalid negative number (%"SVf") in chr", top); value = UNICODE_REPLACEMENT; } } else { |