summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-04-16 13:27:24 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-04-16 13:27:24 +0000
commit7c91f47780c6b4923bae37d60b9019a6a770cdf2 (patch)
tree10dad8ecb04eef997d493100aeb8432d1f1b736e /util.c
parent8d3a61d95b6b366467913bac62d4ce8a1a91f5be (diff)
downloadperl-7c91f47780c6b4923bae37d60b9019a6a770cdf2.tar.gz
A -C parsed from the #! line can still have line endings in it.
p4raw-id: //depot/perl@19238
Diffstat (limited to 'util.c')
-rw-r--r--util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/util.c b/util.c
index 40abb483b0..1f1c6fca06 100644
--- a/util.c
+++ b/util.c
@@ -4324,7 +4324,7 @@ Perl_parse_unicode_opts(pTHX_ char **popt)
if (isDIGIT(*p)) {
opt = (U32) atoi(p);
while (isDIGIT(*p)) p++;
- if (*p)
+ if (*p && *p != '\n' && *p != '\r')
Perl_croak(aTHX_ "Unknown Unicode option letter '%c'", *p);
}
else {
@@ -4349,8 +4349,9 @@ Perl_parse_unicode_opts(pTHX_ char **popt)
case PERL_UNICODE_ARGV:
opt |= PERL_UNICODE_ARGV_FLAG; break;
default:
- Perl_croak(aTHX_
- "Unknown Unicode option letter '%c'", *p);
+ if (*p != '\n' && *p != '\r')
+ Perl_croak(aTHX_
+ "Unknown Unicode option letter '%c'", *p);
}
}
}