Skip to content

Commit

Permalink
base64: use different newline escape
Browse files Browse the repository at this point in the history
  • Loading branch information
aklomp committed Jan 28, 2024
1 parent d8e66f1 commit e9a281c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/base64.c
Expand Up @@ -251,7 +251,7 @@ write_wrapped (const struct config *config, char *buf, size_t len)
// Special case: if buf is NULL, print final trailing newline.
if (buf == NULL) {
if (config->wrap > 0 && col > 0) {
return write_stdout(config, "\n", 1);
return write_stdout(config, "\x0a", 1);
}
return true;
}
Expand Down Expand Up @@ -287,7 +287,7 @@ write_wrapped (const struct config *config, char *buf, size_t len)

// If the line is full, append a newline.
if (col == config->wrap) {
if (iov_append(config, iov, &nvec, "\n", 1) == false) {
if (iov_append(config, iov, &nvec, "\x0a", 1) == false) {
return false;
}
col = 0;
Expand Down

0 comments on commit e9a281c

Please sign in to comment.