aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-13 07:14:48 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-13 07:14:48 -0700
commit8a337f186d99881114ceefb02a513db48f97408f (patch)
tree6ec7eebf0cab3ef698b151a0652ce21cb470a877
parent13fcac0589e72c9c9ed43ec09ae514d3895d6bb5 (diff)
downloadpw-8a337f186d99881114ceefb02a513db48f97408f.tar.gz
pw-8a337f186d99881114ceefb02a513db48f97408f.tar.bz2
pw-8a337f186d99881114ceefb02a513db48f97408f.zip
Bugfix: getln doesn't substitute control chars.
The getln function is used for reading configuration; we don't want control characters in the configuration to be replaced with printable characters.
-rw-r--r--pw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pw.c b/pw.c
index 674a710..5e52a6c 100644
--- a/pw.c
+++ b/pw.c
@@ -279,7 +279,7 @@ static char *getln(FILE *stream)
return line;
if (ch == '\n')
return dsensure(line);
- line = addchesc(line, ch);
+ line = addch(line, ch);
}
}