mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
printf: Raise error on '%0c' and '%0s' formats
This commit is contained in:
parent
58ee0ce427
commit
7094ff17cf
1 changed files with 2 additions and 2 deletions
|
@ -171,7 +171,7 @@ impl Spec {
|
|||
Ok(match type_spec {
|
||||
// GNU accepts minus, plus and space even though they are not used
|
||||
b'c' => {
|
||||
if flags.hash || precision.is_some() {
|
||||
if flags.zero || flags.hash || precision.is_some() {
|
||||
return Err(&start[..index]);
|
||||
}
|
||||
Self::Char {
|
||||
|
@ -180,7 +180,7 @@ impl Spec {
|
|||
}
|
||||
}
|
||||
b's' => {
|
||||
if flags.hash {
|
||||
if flags.zero || flags.hash {
|
||||
return Err(&start[..index]);
|
||||
}
|
||||
Self::String {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue