Skip to content

Conversation

@jfinkels
Copy link
Collaborator

@jfinkels jfinkels commented Feb 2, 2025

Change printf to correctly terminate with an error message when an escape sequence starts with \x but doesn't include a literal hexadecimal value after. For example, before this commit,

printf '\x'

would output \x, but after this commit, it terminates with an error message,

printf: missing hexadecimal number in escape

Fixes #7097

Change `printf` to correctly terminate with an error message when an
escape sequence starts with `\x` but doesn't include a literal
hexadecimal value after. For example, before this commit,

    printf '\x'

would output `\x`, but after this commit, it terminates with an error
message,

    printf: missing hexadecimal number in escape

Fixes uutils#7097
@github-actions
Copy link

github-actions bot commented Feb 2, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre merged commit fc4f39c into uutils:main Feb 2, 2025
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

printf: renders \x as a literal but should error due to missing hexadecimal number

2 participants